开发者社区> 镜像站> NPM> dummy-api
dummy-api
Util for making a fake little RESTful resource in express.js.
Last updated 7 years ago by henrikjoreteg .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install dummy-api 
SYNC missed versions from official npm registry.

dummy-api

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.

installing

npm i dummy-api

using

var express = require('express');
var app = express();

var api = require('dummy-api');

app.get('/api/people', api.list);
app.get('/api/people/:id', api.get);
app.delete('/api/people/:id', api.delete);
app.put('/api/people/:id', api.update);
app.post('/api/people', api.add);

app.listen(3000);

license

MIT

credits

Written by @HenrikJoreteg.

Current Tags

  • 0.0.1                                ...           latest (7 years ago)

1 Versions

  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)