简体   繁体   中英

Node.js arguments when using forever

I'm currently using forever to run my node.js application in our development environment. What I am currently struggling with is how to pass node.js arguments when using "forever start"

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

usage: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM