0.1.0 • Published 5 years ago

koa-find-my-way v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

koa-find-my-way

Router middleware for koa.

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