Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 902 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 902 Bytes

Vanilla NodeJS CRUD REST API

About

A full CRUD REST API implemented in bare-bones NodeJS (no framework like Express).

Features

The endpoints are

  • GET /api/products: get all products.
  • GET /api/products/:id: get the product with id equal to :id.
  • POST /api/products: create a new product (its id is generated by the server with uuid).
  • PUT /api/products/:id: modify the product with id equal to :id.
  • DELETE /api/products/:id: delete the product with id equal to :id.

There's a test.rest file for testing the endpoints. It works with the REST Client VSCode extension.

Running

Clone the repo and run either npm start (or npm run dev for using nodemon).

Acknowledgment

Thanks to Brad Traversy for his tutorial.