This is a project which was created for the Northcoders backend project. The goal of this project is to provide a way to interact with data expected on a news site, such as topics, articles and comments.
- Able to retrieve articles with queries
- Able to create comments for articles
- Able to update votes on comments
- Able to delete comments
$ git clone https://github.com/NicollahSekete/be-nc-news.git
$ npm install
- Create a .env.test and a .env.development file
- in both file add PGDATABASE=<database_name_here> with the correct database name for the environment (see /db/setup.sql for the database names)
$ npm run setup-dbs
$ npm run seed
$ npm start
$ npm test
In a browser or with Insonia look up:
http://localhost:9090/api/articles/1
You are able to run current tests or tests you create through the predefined test script available.
- Node version >= 16.0.0
- PostgreSQL version >= 14.6