当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - Using NVM to start Node in an Upstart Job

问题描述:

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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: