hashrouter
v1.1.1
Published
Generic http-hash router
Downloads
119
Readme
hashrouter
Generic http-hash router
Installation
npm install --save hashrouter
Usage
var HashRouter = require('hashrouter');
var router = HashRouter(function notFound() {
console.log('NOT FOUND 404');
});
router.set('/foo', function foo(req, res, opts) {
// do stuff
});
router('/foo', req, res); // can pass in any number of arguments
opts
is of form { params: , splat: }
See http-hash for more information.