https://mrzzcn.github.io/2019/04/27/host-yapi-with-heroku-and-mongodb-atlas/#more
- 背景前端开发过程中,与后端约定接口标准之后,双方同时开始开发,可能会出现后端没有 Ready,但是前端已经需要使用接口的情况。这时候就需要 Fake 接口。有几种方式: 优点 缺点 1. 项目中使用 Fake Promise 方便快速 不能模拟真实网络请求,对代码有侵入,需要在 webpack 中配置路径替换或手动切换文件 2. 项目中使用 mockjs 等服务端方式启动
https://mrzzcn.github.io/2019/04/27/host-yapi-with-heroku-and-mongodb-atlas/#more