constcombineRouters=require('koa-combine-routers') constdogRouter=newRouter() constcatRouter=newRouter() dogRouter.get('/dogs',asyncctx=>{ ctx.body='ok' }) catRouter.get('/cats',asyncctx=>{ ctx.body='ok' }) constrouter=combineRouters( ...
koa-combine-routers Convenience middleware for composing multiple instances of koa-router. For usage with Koa 1.X, check out the old branch. Installation $ npm install koa-combine-routers Usage app.js const Koa = require('koa') const router = require('./routes') const app = new Koa()...
"name": "koa-combine-routers", "version": "4.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { "version": "7.0.0-beta.44", "resolved": "http://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", "integrity": "sha...