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( ...
For usage with Koa 1.X, check out theoldbranch. Installation $ npm install koa-combine-routers Usage app.js constKoa=require('koa')constrouter=require('./routes')constapp=newKoa()app.use(router()) routes.js constRouter=require('koa-router')constcombineRouters=require('koa-combine-routers'...
Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {{ message }} saadq / koa-combine-routers Public Notifications You must be signed in to change notification settings Fork 6 Star 40 ...