Quickstart
- Prerequisite: ensure local npm bin paths are in your search path (see KB: Adding npm bin/ path to command search path)
- Login to terminal
- Create a folder for your Sails application, in this example, we will use
/var/www/sails
:
cd /var/www
mkdir sails
cd sails
- Install Sails from npm:
npm install sails
- Create a new application called app
sails new app
- Switch to the new directory, app/, and create a Passenger-compatible filesystem layout:
cd app
mkdir public tmp log
- Designate this as a Node application by adding the necessary htaccess directive to public/.htaccess:
echo 'PassengerNodejs /usr/bin/node' > public/.htaccess
- 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
- Access Sails, done!
Default welcome screen for a newly minted Sails application
See also
0 people found this article useful
0 people found this article useful