node/express: set NODE_ENV when using Forever to run script continuously

You can set NODE_ENV as normal and then run forever:

NODE_ENV=production forever [flags] start app.js [app_flags]

The initial NODE_ENV will be preserved when the server restarts – behaviour that was fixed in this issue:

https://github.com/nodejitsu/forever/issues/116

Older versions of forever can use the following command line format:

NODE_ENV=production forever [flags] app.js

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)