【发布时间】:2012-06-23 21:42:51
【问题描述】:
所以我永远使用 nodejs 来保持我的服务器正常运行。我需要传递一些 v8 选项。我可以通过 nodejs 命令行做到这一点,但我怎么能永远做到这一点?
【问题讨论】:
所以我永远使用 nodejs 来保持我的服务器正常运行。我需要传递一些 v8 选项。我可以通过 nodejs 命令行做到这一点,但我怎么能永远做到这一点?
【问题讨论】:
forever start -c "node --harmony" app.js
【讨论】:
forever -c "node --harmony" -w app.js
改为指定一个 shell 脚本。 让脚本 callnode.sh 包含该行
node --debug $1 $2 $3
你可以永远这样称呼它:
var forever = require('forever-monitor');
forever.start(['./callnode.sh', 'your_process.js', {});
或使用永久 cli 选项 -c
【讨论】: