koa-find-my-way
v0.1.0
Published
Router middleware for koa.
Downloads
6
Maintainers
Readme
koa-find-my-way
Installation
$ npm install koa-find-my-way
Usage
const Koa = require('koa');
const Router = require('koa-find-my-way');
const app = new Koa();
const router = new Router();
router.get('/:name', async (ctx, next) => {
const { params, store } = ctx;
ctx.body = 'Hello ' . (params['name'] || 'World');
});
app.use(router.lookup());
app.listen(3000);
License
This software is under the MIT license. See the complete license in:
LICENSE