摘要:
koa 错误处理中间件 koa-json-error 在写接口时,返回json格式且易读的错误提示是有必要的,koa-json-error中间件帮我们做到了 安装使用koa-json-error npm i koa-json-error -S const error = require('koa-j 阅读全文
摘要:
创建路由文件夹,里面放上路由文件,index.js读取当前文件夹下除了index.js文件的所有文件,在app.js中挂载index.js路由 阅读全文
摘要:
用Koa.js,离不开这十个中间件 koa-router文档地址 https://www.npmjs.com/package/koa-router github:https://github.com/ZijianHe/koa-router 详情链接:https://blog.csdn.net/mjz 阅读全文