Create all library
npm install
Go to https://console.cloud.google.com/ and then choose Credentials section.
Then create OAuth client ID
Copy value of Client ID and Client secret
Github
Go to https://github.com/settings/profile and then choose Developer Settings.
After that, we choose OAuth Apps and create new one.
Copy value of Client ID and Client secret
Capcha
Go to https://developers.google.com/recaptcha/intro to create new capcha and then copy its keys.
Database (local host)
Create file .env
Create file .env and paste all the value
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GOOGLE_CAPCHA_SECRET=
GOOGLE_CAPCHA_CLIENT=
DB_HOST=
DB_DBNAME=
DB_USERNAME=
DB_PASSWORD=
DB_PORT=
- Open XAMPP Control Panel and turn on Module
MySQL
-
Open Navicat and create a new database with name
onlinenewspaperdb -
After that, right click on the database name and choose execute sql file
- In the EXECUTE SQL File window, click on
...and chooseonlinenewspaperdb.sqlin db.zip
- click start button
=> successfully deploy database
Run the code below to run the app
npm run start
https://web-development-test-uzd8.onrender.com/
In this project, we use render.com for hosting web app and aiven.io for MySQL database.
Because the website is hosted by render, after a certain period of time, the server will automatically close, so when visiting the website, please wait a moment for the server to restart.
However, database in aiven works at However, aiven's database operates in the French time zone and is 7 hours behind Vietnam time. Therefore, some time-related functions will be affected, such as loading the most recent news, news publication time, etc.



