🚀 API Docs: https://northcoders-news-gida.onrender.com
A RESTful API for articles, users, topics, and comments.
git clone https://github.com/mslmn/northcoders-news-BE.git
cd northcoders-news-BE
npm install
This project uses PostgreSQL and requires environment variables to connect to the correct databases. These environment variable files are ignored by Git, so they must be created manually after cloning.
Create two files in the root directory:
.env.development
.env.test
Inside .env.development
, add:
PGDATABASE=nc_news
Inside .env.test
, add:
PGDATABASE=nc_news_test
✅ These environment variables tell the app which database to connect to for development and testing environments.
To run the application in development:
npm run dev
To run the test suite:
npm test
Make sure your local PostgreSQL databases nc_news
and nc_news_test
exist and are seeded.
Run:
npm run seed
.env.*
files are not tracked by Git to protect sensitive information. Each developer must create their own.env
files.
Happy coding! 🚀