Thursday, 15 March 2012

node.js - Forever with npm start and environment variable -



node.js - Forever with npm start and environment variable -

i used start application using:

debug=chakka environment=production npm start

how can start using forever wouldn't have everytime want test application? thanks!

first need know application's main script file is. open package.json file , find out start script is. if you're using express might app.js. we'll assume app.js example, replace whatever file is.

to start application:

debug=chakka environment=production forever start app.js

to restart application after you've made changes:

forever restart app.js

node.js npm forever

No comments:

Post a Comment