egg-mongoose icon indicating copy to clipboard operation
egg-mongoose copied to clipboard

fix: global plugins in app.config.mongoose.client

Open JayJay1024 opened this issue 5 years ago • 2 comments

Checklist
  • [x] npm test passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines
Affected core subsystem(s)
Description of change
// {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]],
};

VS

// 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]],
  },
};

JayJay1024 avatar Jul 16 '19 15:07 JayJay1024

need unittest

atian25 avatar Jul 17 '19 06:07 atian25

unittest

这个测试就只能是把config.default.js改了

JayJay1024 avatar Jul 17 '19 11:07 JayJay1024