node-router-core
Simple URL/path-based router for node.js
Install
npm install router-core
Examples
Define your router:
var router = router // literal pathrouter // path with parameter
Get a route
var route = routerroutevalue // original value passed into add methodrouteparams // object with parameter matchesroutenextRoute // recursive callback to get the next route if this one isn't good enough
Internal API
More advanced use-cases require accessing the route list. This can be done by accessing the router.routes
array in the
following format:
routerroutes
License
zlib license LICENSE.