Welcome to AC's Northcoders News. This is a resource of articles about all things Northcoders and something things that aren't.
This project requires a basic understanding of node-postgres
, express
, knex
and sql
.
Check out the hosted API here
Fork this repo
Clone this repo:
git clone https://github.com/acarriedev/be-nc-news
cd be-nc-news
npm install jest -D
npm install supertest
npm install express
npm install pg
npm install knex
npm run setup-dbs
npm run seed
The tests for this api have been designed with jest
and jest sorted
. Jest has been set to watch mode. To escape watch mode enter this in the terminal
^c
Tests are found in the __tests__
folder. These tests are designed to ensure endpoints and errors and working and running as they should. To run tests on the app use the app.test.js
file and run this in the terminal.
npm test app
Utility functions have been used in some of the seeding for this project. These functions are for use on small sections of logic used in the project to help the process run more smoothly. The tests are also in the __tests__
folder in utils.test.js
. To test these run this in the terminal
npm test utils
GET /api/topics
GET /api/users/:username
GET /api/articles/:article_id
PATCH /api/articles/:article_id
POST /api/articles/:article_id/comments
GET /api/articles/:article_id/comments
GET /api/articles
PATCH /api/comments/:comment_id
DELETE /api/comments/:comment_id
GET /api
- Alex Carrie - github
- Built using the Northcoders template by Northcoders