- JavaScript 100%
| __tests__ | Correct spelling of createRefObj util function | |
| controllers | total_count property reflects filters | |
| db | Refactor util functions | |
| errors | POST on /api/articles with 400 errors | |
| models | total_count property reflects filters | |
| routes | Add GET method for /api/users endpoint | |
| .gitignore | Update .gitignore with webstorm dotfile | |
| app.js | Enable CORS requests | |
| endpoints.json | Add p and limit query details to endpoints.json | |
| listen.js | Updates for Heroku deploy | |
| package-lock.json | Merging divergence between heroku and github | |
| package.json | Merging divergence between heroku and github | |
| README.md | Update title on README | |
get:it
Overview
This is a Reddit-like REST API created during the back end module on the Northcoders developer bootcamp. Access it live here.
You can peruse the front end codebase here, and visit the website itself at getit.peterkeenan.co.uk
Endpoints currently supported:
GET /api
GET /api/topics
GET /api/users
GET /api/users/:username
GET /api/articles/:article_id
PATCH /api/articles/:article_id
DELETE /api/articles/:article_id
GET /api/articles/:article_id/comments
POST /api/articles/:article_id/comments
GET /api/articles
POST /api/articles
PATCH /api/comments/:comment_id
DELETE /api/comments/:comment_id
Endpoints coming shortly:
POST /api/topics
POST /api/users
See endpoints.json or the main API landing page for a more detailed breakdown on available methods, including sample responses, submissions and queries.
Technology stack
This API uses the
- Express server framework in
- NodeJS, coupled with a
- PostgreSQL database
- KnexJS is used to interface between Node and PSQL in JavaScript
Approach
The code handling requests and responses follows the model-view-controller (MVC) design pattern. Using Jest and Supertest, all development has been test-driven (TDD).
Acknowledgements
The first phase of this project up to commit c6c1cbf was advanced through pair programming with V98Ganz.
All commits prior to commit 331d4e9 are by Northcoders tutors, establishing the starting scaffolding of the repository (sample data, for example).