strapi-hook-mongoose-bootsrap

3.0.0-alpha.15.2 • Public • Published

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

Package Sidebar

Install

npm i strapi-hook-mongoose-bootsrap

Homepage

strapi.io

Weekly Downloads

2

Version

3.0.0-alpha.15.2

License

MIT

Unpacked Size

43.5 kB

Total Files

8

Last publish

Collaborators

  • ykit9