3.0.0-alpha.15.1 • Published 5 years ago

strapi-hook-mongoose-boostrap v3.0.0-alpha.15.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

strapi-hook-mongoose-bootstrap

This is fork from official strapi module.

This built-in hook allows you to use the Mongoose ORM.

Mongoose ORM provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

Resources

Links

Usage

Rename your model configs file located at {{project_folder}}/api/{{apiname}}/config/models from apiname.settings.json to apiname.settings.js.

Add module.exports to export the config.

Now you can add the function

boostrap: schema => {
 // stuff
} 

It'll invoke before initializing moongoose model, therefore is useful to attaching mongoose plugins