Skip to content

This is a generator for creating a scaffold (CRUD) for a Sails Project

License

Notifications You must be signed in to change notification settings

e9labs/sails-generate-scaffold

 
 

Repository files navigation

sails-generate-scaffold

Note: This module requires Sails v0.10.0-rc8 or higher.

A scaffold generator for use with the Sails command-line interface. A scaffold generates a rudimentary model, CRUD controller actions (e.g. index, new, create, edit, update, and destroy), and corresponding views of a Sails project. The scaffold generator will also create a policy that enables flash messages for errors on the new and edit views.

To install:

$ npm install sails-generate-scaffold

Next open up the .sailsrc file located in the root of your sails project. Add the scaffold by typing:

{
  "generators": {
    "modules": {
    	"scaffold": "sails-generate-scaffold"
    }
  }
}

To create a scaffold

On the command line
$ sails generate scaffold <a name for your scaffold> <optional: attributename:attributetype> <optional: --force>

Example:

$ sails generate scaffold user name:string age:integer email:email

The first argument will be the model and controller name. You can add any number of model attributes and types. Finally, you can overwrite an existing scaffold by using the --force parameter.

More Resources

License

MIT © 2014 irlnathan & contributors

As for Sails? It's free and open-source under the MIT License.

image_squidhome@2x.png

About

This is a generator for creating a scaffold (CRUD) for a Sails Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%