Forever: With two node versions installed, specify a node version to run with

I need 2 versions of NodeJS to run two different applications. One version is available in the default path so I can run it by calling node . The other version is installed at ~/node-v10/bin/node .

When I do forever start app.js , it's started with the first version. I

How do I start a forever script with the second node version? Forever doesn't appear to have a configuration to allow me to specify the node path.

I've tried this, but it doesn't work. Forever still starts with the old version:

NODE_PATH=~/node-v10/bin/node forever start app.js

You can also use -c to specify the command:

forever start 
  -c /opt/node-0.8.22-1e7b3d5/bin/node 
  /var/www/app/server.js

-c defaults to node , so normally forever will just use the first node in the $PATH.

链接地址: http://www.djcxy.com/p/71192.html

上一篇: 如果视频持续时间长于音频持续时间,如何重复音频轨道

下一篇: Forever:安装两个节点版本,指定要运行的节点版本