I was wondering, if I\'m deploying a Meteor app to a VM, why can\'t I just install Meteor on the vm, and run my app with the meteor run command? The deployment section of the d
Your idea would work fine. However, I would just suggest that if you are going to use this you might as well run in in a more "production" type of environment. And it is pretty easy to setup.
On a high level here is what you will need:
To make my life easier I created a script to handle starting/stopping my meteor app. It will set everything up to use the full MongoDB:
#!/bin/bash
SUCCESS=0
FAILURE=1
if [ $# -ne 1 ]
then
echo "Usage: start|stop|restart"
exit $FAILURE
fi
case "$1" in
start )
export MONGO_URL=mongodb://localhost:27017/
export PORT=3000
export ROOT_URL=http://yourhostname.com:3000
forever start bundle/main.js
;;
stop )
forever stop bundle/main.js
;;
restart )
forever restart bundle/main.js
;;
esac