Schnellstart
- 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 Dateisystem-Layout:
cd app mkdir public tmp log
- Designate this as a Node application by adding the necessary htaccess-Richtlinie to public/.htaccess:
echo 'PassengerNodejs /usr/bin/node' > public/.htaccess
- Connect /var/www/sails/app/public to a Subdomain oder Addon-Domäne innerhalb der Bedienfeld
- The subdomain
sails.sandbox.apnscp.com
is connected to the filesystem path/var/www/sails/app/public
via Web > Subdomains
- The subdomain
- Access Sails, done!
Siehe auch
- Sails demo running on Sol, a v6 platform
- Sails documentation (sails.org)