routes-router-mount
Call prefix
on a routes-router and remove the prefix from the req.url
install
$ npm install routes-router-mount
usage
Wrap a routes-router to get a mount
method:
var http = var mount = var Router = var router = routerprefix'/apples' { res} router http
Then GET some urls:
$ curl -L http://127.0.0.1:8080/apples/grannysmith$ curl -L http://127.0.0.1:8080/apples2/grannysmith
Would print:
/apples/grannysmith
/grannysmith
licence
MIT