2

I am trying to start my Node server inside an ubuntu upstart process. I really want to use my NVM environment. But I just can't seem to get it going.

Does anyone have a code snippet of an upstart job that launches their node application within a node virtual environment.

Barry Steyn
  • 1,563
  • 3
  • 19
  • 25
  • I have a snippet code of using upstart to launch a node application. but I don't understand what do u mean by within a node virtual environment. hmmmm – murvinlai Nov 26 '12 at 19:47
  • @murvinlai I mean NVM (Node version manager) - sorry, I got confused. – Barry Steyn Nov 28 '12 at 03:54

1 Answers1

0

Change the script command to exec bash -c 'source /home/dev/nvm/nvm.sh && exec node app' where /home/dev/nvm/nvm.sh is the filepath of your nvm.sh file see also http://doctrina.org/NodeJS-Under-NVM-With-Upstart.html

tmoe
  • 1