npm init -y
安装依赖
npm i koa koa-router koa-body @koa/cors koa-json -S
新建 src/index.js
// 路由压缩 npm i koa-combine-routers -S // 加入安全的头 npm i koa-helmet -S // 静态资源托管 npm i koa-static -S
← Restful接口示例 koa配置开发热模块 →