I am trying to use this command, which should work. It does not seem to go through the environment variable when starting a server that uses Express.js. This is for this open source project, Bus Ticker .
PORT=8081; forever start ./website/app.js
There app.jsis this line in, so I expect that I can set the environment variable on this command line, as shown above.
app.set('port', process.env.PORT || process.env.npm_package_config_port || 3000);
source
share