REST API's CRUD demo

with lowdb database and nodejs express.

type cmd note
DEL /del/:id delete one entry based on id
GET /get/:id get (read) content based on id
PUT /put/:id?todo=lorem put (update) content based on id, or (create) if id is not found.
POS /pos post (create) content with http body [todo:lorem] [application/x-www-form-urlencoded] (2)
|
POS /pos?todo=lorem post (create) content with query params (1)
GET /c clear all entries.
GET /r reset all entries to default value.

id content

Reset | Clear


References:
https://github.com/typicode/lowdb
https://blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/