addressbook-rest
A simple array based REST service for address book apps
Last updated 3 years ago by kayartayavinod .
MIT · Original npm · Tarball · package.json
$ cnpm install addressbook-rest 
SYNC missed versions from official npm registry.

A simple array based REST service for address book apps

Installing:

npm install --save addressbook-rest

Using:

Create a file server.js under the project folder (along side package.json)

Simplest code to start the REST service at port 8080 with a base url "/api/":

require("addressbook-rest").start();

Customization of port and base url prefix:

var server = require("addressbook-rest");
var port = 9999;
var baseUrl = "api";

server.start({ port, baseUrl }, ()=>{ 
	console.log(`Server is running at http://localhost:${port}/${baseUrl}/contacts`)
});

Accessing:

Visit http://localhost:9999/api/contacts using a browser (or a REST client)

Current Tags

  • 2.0.7                                ...           latest (3 years ago)

7 Versions

  • 2.0.7                                ...           3 years ago
  • 2.0.5                                ...           3 years ago
  • 2.0.4                                ...           3 years ago
  • 2.0.3                                ...           3 years ago
  • 2.0.2                                ...           3 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 3
Last Day 0
Last Week 0
Last Month 7
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |