DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Running Meteor and Node App on Ubuntu 14.04 VPS


Setup Environment with MUP

On your laptop, install mup with npm install -g mup. In a new directory, create a mup project with mup init. Set "setupMongo", "setupNode" and "setupPhantom" to "true" in mup.json, and run mup setup.

Run Apps

To install the first Meteor app, mup deploy.

To install the second (there has been a Meteor app is running) or more, set "setupMongo", "setupNode" and "setupPhantom" to "false" in mup.json, change "appname", "app" and values in "env" accordingly. Finally run mup deploy.

For Node app, first get the source code with git, then run it with forever, which is installed by mup:

aptitude install git
git clone ... projHome
cd projHome
npm install
# confirm port number in config.js
forever start app.js  # when the main script is "app.js"

Get the app status with forever list. If the app can't start, print logs with forever logs 1 (if the target app's index in forever list is 1).

Setup Routes

Note: MUP requires Node v0.10.36 or later. So do NOT install node with aptitude install nodejs.



Published

Jul 22, 2015

Last Updated

Jul 22, 2015

Category

Tech

Tags

  • meteor 47
  • node 4
  • ubuntu 61
  • vps 5

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor