Edit Page

sails new

Create a new Sails project.

sails new your-app-name

Usage:

#

Most Sails apps should be generated simply by running sails new your-app-name, without any additional customization. But sails new also accepts the following options:

Example

#

To create a project called "test-project" in code/testProject/:

$ sails new code/testProject
info: Installing dependencies...
Press CTRL+C to skip.
(but if you do that, you'll need to cd in and run `npm install`)
info: Created a new Sails app `test-project`!

To create a Sails project in an existing myProject/ folder:

$ cd myProject
$ sails new .
info: Installing dependencies...
Press CTRL+C to skip.
(but if you do that, you'll need to cd in and run `npm install`)
info: Created a new Sails app `my-project`!

Creating a new Sails app in an existing folder will only work if the folder is empty.

Notes:

#
  • sails new is really just a special generator which runs sails-generate-new. In other words, running sails new foo is an alias for running sails generate new foo, and like any Sails generator, the actual generator module which gets run can be overridden in your global ~/.sailsrc file.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Reference

Reference