Forrest logo
back to the sails tool

sails:tldr:28413

sails: Generate Sails API.
$ sails generate ${name}
try on your machine

The command "sails generate ${name}" is used in the Sails.js framework to generate various artifacts or files for your application.

The "${name}" part of the command is a placeholder for the actual name of the artifact you want to generate. It could be a model, controller, or any other Sails.js component.

For example, if you want to generate a Model named "User", you would run the command "sails generate model User". This will create a User.js file in the models directory, where you can define the attributes and behaviors of the User model.

Similarly, if you want to generate a Controller named "UserController", you would run the command "sails generate controller UserController". This will create a UserController.js file in the controllers directory, where you can define the actions or methods associated with the User model.

You can use this command with various other keywords to generate different types of artifacts in the Sails.js framework, such as services, policies, views, etc. The generated files provide a starting point for your application's components and can be customized according to your specific requirements.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the sails tool