https://github.com/csbun/koa-regexp-router
Simple Regexp Router for Koa
https://github.com/csbun/koa-regexp-router
Last synced: over 1 year ago
JSON representation
Simple Regexp Router for Koa
- Host: GitHub
- URL: https://github.com/csbun/koa-regexp-router
- Owner: csbun
- License: mit
- Created: 2015-10-10T10:37:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-10T10:54:09.000Z (over 10 years ago)
- Last Synced: 2024-04-25T14:21:06.761Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-regexp-router
```javascript
const REGEXP = /^\/([\w\-]+)\/(\d+)$/;
// /( res ) /(num)
koa.use(regexpRouter(REGEXP, function * (path, res, num) {
// ...
}));
```