如何快速新建路由 服务端 Demo 采用 Koa.js 框架编写,腾讯云基于 Koa 对上层进行一个简单的封装,方便你快速的添加新建路由 只需要在 controllers 目录下新建一个文件,例如为 demo.js,写入如下代码: module.exports = function (ctx, next) { ctx.state.data = { msg: 'Hello World' } } 保存之后,接着在 routes/index.js 的 module.exports = router 之…