0.5.0 • Published 8 years ago
dolphin-mongoose-module v0.5.0
Installation
npm install dolphin-mongoose-package --save
MongooseConfigurationFactory
The factory has default properties and methods:
- events (start, end) work via promises
- debug - true or false
- database - the link of current DB
- plugins - filepath of plugins
- db - host to mongoDB
- dbOptions - for tuning
methods:
- addModule - registration custom module
When you call "addModule" the plugin will read all models and extensions:
package_folder
server
models - mongoose models
models_ext
A model extension must be the following code:
module.exports = function () {
return {
model: 'User', // name of model which need to extend
plugin: function (schema, options) {
}
};
};
0.5.0
8 years ago
0.4.0
8 years ago
0.3.6
8 years ago
0.3.5
8 years ago
0.3.4
8 years ago
0.3.3
8 years ago
0.3.2
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.9
8 years ago
0.2.8
8 years ago
0.2.7
8 years ago
0.2.6
8 years ago
0.2.5
8 years ago
0.2.4
8 years ago
0.2.3
8 years ago
0.2.2
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago