Util for making a fake little RESTful resource in express.js.
Simple util for having a dummy RESTful API. No database necessary, this is just to aid in development of clientside apps.
I just never wanted to do this again and it's useful for me in more than one project.
npm i dummy-api
var express = require'express';var app = express;var api = require'dummy-api';appget'/api/people' apilist;appget'/api/people/:id' apiget;appdelete'/api/people/:id' apidelete;appput'/api/people/:id' apiupdate;apppost'/api/people' apiadd;applisten3000;
Written by @HenrikJoreteg.