Closed sinalvee closed 6 years ago
I've not tried. But this plugin follow the same pattern of egg-myslq
. So please feel free to try it (and I will be glad to know your result).
ok, 可以了,这样就行
// app.js
app.database = app.mongo.createInstanceAsync(config);
https://eggjs.org/zh-cn/advanced/plugin.html#%E5%8A%A8%E6%80%81%E5%88%9B%E5%BB%BA%E5%AE%9E%E4%BE%8B