1. 快速
https://blog.csdn.net/xiaoba_598/article/details/83141894
其中要在 config>plugin.js中添加以下代码
const mongoose = require('mongoose');
exports.mongoose = {
enable: true,
package: 'egg-mongoose',
};
------------------------------------
具体请看官方文档
https://github.com/eggjs/egg-mongoose
https://www.npmjs.com/package/egg-mongoose