Socket
Socket
Sign inDemoInstall

sails-crud-generators

Package Overview
Dependencies
58
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sails-crud-generators

Custom Sails.js generators for automatic generation of db models, controllers, routes and unit tests


Version published
Maintainers
1
Created

Readme

Source

sails-crud-generators

A set of custom generators for use with the Sails command-line interface.

Installation

$ npm install sails-crud-generators --save

Then merge the following into your .sailsrc file:

{
  "generators": {
    "modules": {
      "db:sync": "./node_modules/sails-crud-generators/src/generators/sails-generate-sequelize-sync",
      "schema": "./node_modules/sails-crud-generators/src/generators/sails-generate-schema",
      "controller": "./node_modules/sails-crud-generators/src/generators/sails-generate-crud-controller",
      "route": "./node_modules/sails-crud-generators/src/generators/sails-generate-route",
      "api": "./node_modules/sails-crud-generators/src/generators/sails-generate-api"
    }
  }
}

Certain generators are installed by default in Sails, but they can be overridden. Other generators add support for generating entirely new kinds of things. Check out Concepts > Extending Sails > Generators for information on installing generator overrides / custom generators and information on building your own generators.

Usage

$ sails generate db:sync
$ sails generate schema <schema-name> --types json,sql --fields field1,field2,field3,..
$ sails generate controller <schema-name> --type sql|mongo
$ sails generate route <schema-name>
$ sails generate api <schema-name> --type json|sql|mongo --fields field1,field2,field3,..

Need help?

See Extending Sails > Generators > Custom Generators in the Sails documentation, or check out recommended support options.

Sails.js logo (small)

Contributing

Please observe the guidelines and conventions laid out in the Sails project contribution guide when opening issues or submitting pull requests.

License

This sequelize:sync generator is available under the MIT license.

The Sails framework is free and open-source under the MIT License.

image_squidhome@2x.png

FAQs

Last updated on 15 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc