https://github.com/puse/decanat-router
Client-side router.
https://github.com/puse/decanat-router
Last synced: over 1 year ago
JSON representation
Client-side router.
- Host: GitHub
- URL: https://github.com/puse/decanat-router
- Owner: puse
- License: mit
- Created: 2014-06-22T06:25:38.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-01T14:32:27.000Z (about 12 years ago)
- Last Synced: 2025-02-01T08:26:38.719Z (over 1 year ago)
- Language: JavaScript
- Size: 355 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  decanat-router
Client-side router.
## Installation
Using [component](https://github.com/component/component):
$ component install decanat/router
Using [npm](http://npmjs.org/) for [browserify](http://browserify.org/):
$ npm install decanat-router
## Usage
```js
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 test
## Forebears
-
-
## License
The MIT License.