Backend API for a simple news application
See the live example hosted here
To get a local copy up and running follow these simple example steps.
The required software you need to use this project is listed below:
- node.js, see: https://nodejs.org/
- pSQL, see: https://www.postgresql.org/
This project was built using psql v14.10 & node v21.2.0.
-
Clone the repo:
git clone https://github.com/jonathondilworth/nc-news.git
-
Create your
.env.test
and.env.development
files to reference the test and development databases:.env.test:
PGDATABASE=nc_news_test
.env.development:
PGDATABASE=nc_news
.env.production:
DATABASE_URL=postgres://db.example.com/
Please check the .env-example file for a template on this projects environment variables.
-
Install NPM packages:
npm install
-
Initialise databases:
npm run setup-dbs
-
Seed the development database:
npm run seed
npm run test