The purpose of this API is to provide information about news in form of articles, topics, comments, and users.
Link to the hosted version : https://be-nc-news-cvii.onrender.com/api
-
Clone the project locally
git clone https://github.com/ffm-id/BE-NC-News-Feri-.git
-
Install required dependencies
npm i
-
Seed local database
npm run setup-dbs
npm run seed
-
Run tests
npm t __tests__/app.test.js
-
Create
.env
files
Create two .env files,.env.test
and.env.development
in the root folder of the repository in order to successfully connect to the two databases locally. Into each, addPGDATABASE=<database_name_here>
, with the correct database name for each environment (see/db/setup.sql
for the database names). Example of.env
file can be found in.env-example
.
- Node.js v17.7.2
- Postgres v12.11