View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page


Here is a non-comprehensive list of Sails.js hosting providers.

Deploying to Modulus?
Deploying to OpenShift?

To deploy to OpenShift, you'll need to make some minor modifications to your configuration: Open up config/local.js in your app folder. In here, you'll need to add the following lines.

port: process.env.OPENSHIFT_NODEJS_PORT,
    host: process.env.OPENSHIFT_NODEJS_IP,

You will also need to install grunt-cli with npm i --save grunt-cli.

After doing that, create the file .openshift/action_hooks/pre_start_nodejs with the following contents. (source)

export NODE_ENV=production

if [ -f "${OPENSHIFT_REPO_DIR}"/Gruntfile.js ]; then
    (cd "${OPENSHIFT_REPO_DIR}"; node_modules/grunt-cli/bin/grunt prod)

Then create the file /supervisor_opts with the following contents. This tells OpenShift's supervisor to ignore Sails' .tmp directory for the hot reload functionality. (source)

-i .tmp

You can now git add . && git commit -a -m "your message" && git push to deploy to OpenShift.

Using DigitalOcean?
Deploying to Heroku?
Deploying to AWS?
Using PM2?
Deploying to CloudControl?
Getting professional help

These days, it's getting easier and easier to deploy powerful applications at scale. That said, there isn't always time to do these things yourself. Sails.js is maintained by my company, Balderdash, a Node.js consultancy in Austin, TX. If your company needs professional support, reach out and we're happy to help. The deployment part really isn't that hard, and in most cases, it shouldn't take more than a couple of hours tops.

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-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.