0.5.0 • Published 9 years ago

dolphin-mongoose-module v0.5.0

Weekly downloads
58
License
-
Repository
github
Last release
9 years ago

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

9 years ago

0.4.0

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago