1. Home
  2. Node
  3. Sails Quickstart

Sails Quickstart


  1. Prerequisite: ensure local npm bin paths are in your search path (see KB: Adding npm bin/ path to command search path)
  2. Login to terminal
  3. Create a folder for your Sails application, in this example, we will use /var/www/sails:
    cd /var/www
    mkdir sails
    cd sails
  4. Install Sails from npm:
    npm install sails
  5. Create a new application called app
    sails new app
  6. Switch to the new directory, app/, and create a Passenger-compatible filesystem layout:
    cd app
    mkdir public tmp log
  7. Designate this as a Node application by adding the necessary htaccess directive to public/.htaccess:
    echo 'PassengerNodejs /usr/bin/node' > public/.htaccess
  8. Connect /var/www/sails/app/public to a subdomain or addon domain within the control panel

    • The subdomain sails.sandbox.apnscp.com is connected to the filesystem path /var/www/sails/app/public via Web > Subdomains
  9. Access Sails, done!

    Default welcome screen for a newly minted Sails application

    Default welcome screen for a newly minted Sails application

See also

Updated on July 8, 2019

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help! If you get an error, visit https://lithiumhosting.com/support instead.
Contact Support