For instructions, please head over to L2C NC News.
To successfully connect to the two databases locally, follow these steps:
- Create 2 .env file in the root directory of the project
- write PGDATABASE=
- Add the name of the database ( you can find them in db/seeds/setup.sql)
example:
PGDATABASE=this_is_an_example
- Create a GET /api/topics endpoint
- Responds with an array of topic objects, with slug and description properties
- Deal with the 404 Error
- Create a GET /api endpoint
- Responds with an object describing all the available endpoints on your API
- Use TDD and also test for any error
- Create a GET /api/articles/:article_id endpoind
- Responds with an object of the selected article endPoint
- Deal with errors that this endPoint can cause
- Create a GET /api/articles endpoint
- Responds with an array of article objects with the associated properties
- Consider what errors could occur with this endpoint, and make sure to test for them
- GET /api/articles/:article_id/comments endpoint
- Responds with an array of comments for the given article_id of which each comment should have the associated properties
- Consider and test for any error
- POST /api/articles/:article_id/comments
- Add a comment for an article
- Responds with the posted comment
- PATCH /api/articles/:article_id Should be available on /api/articles :article_id
- Update an article by article_id
- Deal with errors
- CORE: DELETE /api/comments/:comment_id
- Delete the given comment by comment_id
- Deal with errors
- GET /api/users
- Responds with an array of objects with the associated properties
- Consider what errors could occur with this endpoint
FEATURE REQUEST The endpoint should also accept the following query:
- topic, which filters the articles by the topic value specified in the query. If the query is omitted, the endpoint should respond with all articles.
- Consider what errors could occur with this endpoint, and make sure to test for them.
- You should not have to amend any previous tests.