sails-hook-mongo-index

1.0.5 • Public • Published

sails-hook-mongo-index

By default sails.js does not create mongo indexes indexes defined in models.

This hook ensures that indexes created if they does not exist.

Install

npm install --save sails-hook-mongo-index

How To

Simply install the package.

Example how to add indexes:

name: {
  type: 'string',
  index: true
}

for unique:

name: {
  type: 'string',
  unique: true
}

/sails-hook-mongo-index/

    Package Sidebar

    Install

    npm i sails-hook-mongo-index

    Weekly Downloads

    0

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    3.56 kB

    Total Files

    3

    Last publish

    Collaborators

    • num8er