A backend news project which returns requests for fictional data on articles, comments and users.
Built using JavaScript and PostgreSQL for database creation and data storage (hosted on ElephantSQL).
This project is hosted on Render:
Access API here
The link will provide .json info on all endpoints available.
node.js - version ^10.13.0
postgres - version ^8.7.3
git clone https://github.com/KelvinUng1/ncNewsAPI.git
npm install
Package documentation:
dotenv: https://www.npmjs.com/package/dotenv
express: https://expressjs.com/
jest: https://jestjs.io/docs/getting-started
pg: https://www.npmjs.com/package/pg
fs: https://nodejs.org/api/fs.html
3. Create .env.dev
& .env.test
files in the root folder in order to successfully connect to the two databases:
PGDATABASE=$database_name_here$
PGDATABASE=$test_database_name_here$
/db/setup.sql
contains the database names for each environment
npm run setup-dbs
npm run seed
npm run test