Node.js arguments when using forever

11.8k views Asked by At

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
1

There are 1 answers

4
Will Shaver On BEST ANSWER

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.