Skip to content

dibolsoni/partNine

Repository files navigation

partNine - REST API from Treehouse

This API provides a way for users to administer a school database containing information about courses: users can interact with the database by retrieving a list of courses, as well as adding, updating and deleting courses in the database.

INSTALL

Steps:
@ 1 - download files
@ 2 - install dependecies -> npm install
@ 3 - install db -> npm run seed
@ 4 - start project -> npm start

USAGE

  • GET /api/users - status code if ok: 200 - Returns the currently authenticated user
  • POST /api/users - status code if ok: 201 - Creates a user, no content returned
  • GET /api/courses - status code if ok: 200 - Returns a list of courses
  • GET /api/courses/:id - status code if ok: 200 - Returns a the course for the provided course ID
  • POST /api/courses - status code if ok: 201 - Creates a course, no content returned
  • PUT /api/courses/:id - status code if ok: 204 - Updates a course, no content returned
  • DELETE /api/courses/:id - status code if ok: 204 - Deletes a course, no content returned