Skip to content

Repository files navigation

Project : NEWSPAPER

@Author: Trần Trung Tín, Nguyễn Nhật An, Nguyễn Mai Huy Hoàng, Mai Đức Kiên

1. Setup library

Create all library

npm install

2. Setup API for Project (Optional if we do not have file .env)

Google

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=

3. Set up Database (local host)

  1. Open XAMPP Control Panel and turn on Module MySQL

image

  1. Open Navicat and create a new database with name onlinenewspaperdb

  2. After that, right click on the database name and choose execute sql file

image

  1. In the EXECUTE SQL File window, click on ... and choose onlinenewspaperdb.sql in db.zip

image

  1. click start button

image

=> successfully deploy database

4. Start the project

Run the code below to run the app

npm run start

5. Additional information

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages