You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

sails-crud-generators

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

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

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 15 Nov 2019

Did you know?

Socket

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