How can I split my koa routes into separate files?
EDIT: I’ve updated the code examples below because the koa-router package on npm is no longer maintained. The Koa team has made an official fork of it under the name @koa/router. For anyone reading this, who is curious on how to do this in Koa 2.X: app.js import Koa from ‘koa’ import rootRouter from ‘./routes/root’ … Read more