sgs

sails-generate-scaffold

sails generate scaffold

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

3

Size (min+gzip)

48.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial