vanilla-nodejs-api icon indicating copy to clipboard operation
vanilla-nodejs-api copied to clipboard

Simple NodeJS API without express, for learning purposes

Vanilla NodeJS API

Simple NodeJS API without express, for learning purposes.

I have been building RESTful APIs in NodeJS with the help of Express and and other node packages for a while now.

I thought I would build a simple NodeJS API without any frameworks to get a better understanding of what goes on under the hood.

Running

Download, install packages with npm i and run with npm run dev.

The server should be running on your http://localhost:5000.

The API

The following endpoins are implemented:

  • GET /api/products
  • GET /api/products/:id
  • POST /api/products
  • PATCH /api/products/:id
  • DELETE /api/products/:id