Laufender Meteor

Übersicht

Meteor is a web framework written on top of Node.js. Meteor hooks into Passagier for seamless process launching and flexible, agile scalability. Meteor requires terminal access to use. This guide covers launching Meteor on a v6+ platform.

Schnellstart

  1. VORAUSSETZUNG: follow the MongoDB tutorial to setup MongoDB.
  2. Install Meteor from the Terminal:
    • cd ~
      curl https://install.meteor.com/ | sh
    • Once done, you’ll see a confirmation that it has been installed:
      Meteor 1.0.3.1 has been installed in your home directory (~/.meteor).
      Writing a launcher script to /usr/local/bin/meteor for your convenience.
      
      To get started fast:
      
      $ meteor create ~/my_cool_app
      $ cd ~/my_cool_app
      $ meteor
    • Hinweis: tempting as it may be, do not install the meteor package from npm. The package available is an unofficial fork and has not been removed by the repository custodian.
  3. Change directories to /var/www to create a new Meteor app that will, in this example, be called meteorapp and connected to a subdomain accessible via http://meteorapp.example.com:
    • cd /var/www
      meteor create meteorapp
  4. Next, connect öffentlich/ zu einer Subdomain innerhalb der Bedienfeld via Web > Subdomains

    Connecting Meteor to a subdomain in the control panel

    Connecting Meteor to a subdomain in the control panel

  5. Now for the most difficult and daring step: adding 6 directives and substituting variables! Meteor requires a few environment variables to run reliably. These variables are handed off from Apache to Passenger and passed onto Meteor. You will need to know your home directory, because this location stores a few additional Meteor system files. Create a .htaccess control file in öffentlich/
    • PassengerNodejs /usr/bin/node
      PassengerStickySessions On
      SetEnv HOME /home/<USERNAME>
      SetEnv MONGO_URL mongodb://127.0.0.1:<PORT>/meteor
      SetEnv MONGO_OPLOG_URL mongodb://127.0.0.1:<PORT>/local
      SetEnv ROOT_URL http://<HOSTNAME>
    • Substitute <HOSTNAME> for your fully-qualified domain created within the control panel. In our example, taking into account the domain Beispiel.com and subdomain meteorapp, it is meteorapp.example.com.
    • Substitute <PORT> for the MongoDB port chosen from the VORAUSSETZUNG MongoDB tutorial at the start.
    • Substitute <USERNAME> for the username that you logged into the control panel with and where Meteor was installed. This is your home directory.
  6. Access your Meteor install through the web site. The first request will take several seconds to initialize and connect to the database. Once initialized, subsequent requests will be much faster (and have a 95% chance of vaporizing from exceeding terminal velocity).
  7. Viel Spaß!

    Meteor confirmation page on a basic install

    Meteor confirmation page after installation

Odds and Ends

Neustart von

Meteor piggybacks Passenger, and in doing so, can be easily restarted using the tmp/ control directory. Follow the general guide to restarting a Passenger-backed application.

Siehe auch

Aktualisiert am März 7, 2021

Verwandte Artikel