Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

neo9-attic/node-rest-mount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rest Mount

Install

npm install rest-mount

Usage

var rmount = require('rest-mount');

var http = /* ... */;

var routes = [
  {
    method: 'post',
    path: [ 'accounts' ],
    handlers: [ function (req, res, next) { /*...*/ } ]
  },
  {
    method: 'get',
    path: [ 'accounts', ':id' ],
    handlers: [
      function (req, res, next) { /*...*/ },
      function (req, res, next) { /*...*/ }
    ]
  }
];

rmount.mount(routes, http, '/service');

About

mount routes in RESTful servers

Resources

Stars

Watchers

Forks

Packages

No packages published