1.1.1 • Published 9 years ago

hashrouter v1.1.1

Weekly downloads
10
License
MIT
Repository
github
Last release
9 years ago

hashrouter

NPM version Github release Build status Test coverage Dependency Status License

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.