1. Startseite
  2. Node
  3. Sails Quickstart

Sails Quickstart

Schnellstart

  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 Dateisystem-Layout:
    cd app
    mkdir public tmp log
  7. Designate this as a Node application by adding the necessary htaccess-Richtlinie to public/.htaccess:
    echo 'PassengerNodejs /usr/bin/node' > public/.htaccess
  8. 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
  9. Access Sails, done!

    Default welcome screen for a newly minted Sails application

    Default welcome screen for a newly minted Sails application

Siehe auch

Aktualisiert am März 7, 2021

Verwandte Artikel