It is a backend API built with Node.js and postgres, and was created as part of the Northcoders course curriculum. The API is built for the purpose of accessing application data programmatically.
- Node.js:
node -v | v18.4.0
- postgres:
psql -v | 8.7.3
-
Clone this repository
-
Install project dependencies with
npm install
-
Add the following files:
- .env.test :
PGDATABASE=nc_news_test
- .env.development :
PGDATABASE=nc_news
- .env.test :
-
Run the database setup script
npm run setup-dbs
-
Seed the database
npm run seed-prod
-
Run the tests
npm t
Access the "/api" endpoint which will detail available endpoints.
Hosted version of the API: https://news-articles.onrender.com