0.2.0 • Published 11 years ago
decanat-router v0.2.0
decanat-router
Client-side router.
Installation
Using component:
$ component install decanat/routerUsing npm for browserify:
$ npm install decanat-routerUsage
var Router = require('router');
var router = Router();
router.route('/blog/:thread/')
.use(function(ctx, next){
console.log(ctx.params.thread); // thread id parsed from url
next()
});
router.listen();Test
Run unit tests:
$ make testForebears
License
The MIT License.