Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
mount routes in RESTful servers
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
index.js
package.json
test.js

README.md

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');
Something went wrong with that request. Please try again.