Built with ❤️ by DavidMass
This is the back-end repository for the NC News project. It provides a RESTful API for the nc-news-fe (front-end) application.
- Filter articles by category.
- Vote on articles.
- Post comments.
- Delete comments.
- Vote on comments.
- Clone this repository.
- Install the necessary dependencies by running
npm install. - Set up the required environment variables in
.envfiles. - Run
npm run setup-dbsto set up the databases. - Run
npm run seedto seed the databases.
Create two .env files:
.env.test.env.development
Add the following to each file:
PGDATABASE=<database_name_here>Replace <database_name_here> with the appropriate database names:
- nc_news_test
- nc_news
Run npm test to run the tests and ensure everything is functioning correctly.