[英]Node.js arguments when using forever
I'm currently using forever to run my node.js application in our development environment. 我目前正在使用永远在我们的开发环境中运行我的node.js应用程序。 What I am currently struggling with is how to pass node.js arguments when using "forever start"
我目前正在努力的是如何在使用“forever start”时传递node.js参数
Here is an example where I need to pass a number and a date to node. 这是一个我需要将数字和日期传递给节点的示例。 It's not working so any help would be appreciated.
它不起作用所以任何帮助将不胜感激。
forever -c 'node 8010 "2014-11-11 12:00:00"' start app.js
According to the documentation, the script arguments come after the call. 根据文档,脚本参数在调用之后出现。 https://github.com/nodejitsu/forever
https://github.com/nodejitsu/forever
usage: forever [action] [options] SCRIPT [script-options] 用法:forever [action] [options] SCRIPT [script-options]
forever start app.js 8010 "2014-11-11 12:00:00"
The usage of nconf https://github.com/flatiron/nconf in your project is highly recommended to grab those params. 强烈建议您在项目中使用nconf https://github.com/flatiron/nconf来获取这些参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.