// {app_root}/config/config.default.js
exports.mongoose = {
url: 'mongodb://127.0.0.1/example',
options: {},
// mongoose global plugins, expected a function or an array of function and options
plugins: [createdPlugin, [updatedPlugin, pluginOptions]],
};
// recommended
exports.mongoose = {
client: {
url: 'mongodb://127.0.0.1/example',
options: {},
// mongoose global plugins, expected a function or an array of function and options
plugins: [createdPlugin, [updatedPlugin, pluginOptions]],
},
};
egg-mongoose
Egg’s mongoose plugin.
Install
Configuration
Change
{app_root}/config/plugin.jsto enableegg-mongooseplugin:Simple connection
Config
Example
Multiple connections
Config
Example
Default config
see config/config.default.js for more detail.
Multi-mongos support
Questions & Suggestions
Please open an issue here.
Contribution
If you are a contributor, follow CONTRIBUTING.
License
MIT
Contributors
jtyjty99999
popomore
atian25
dead-horse
BaffinLee
trylovetom
ChangedenCZD
hardywu
JasinYip
netputer
Wai-Dung
duncup
jinasonlin
legendecas
lzqmyb
DevXiaolan
villins
This project follows the git-contributor spec, auto updated at
Sat Aug 12 2023 11:16:17 GMT+0800.