pmservice / predictive-modeling-samples

documents and samples about how to use Predictive Modeling Service in Bluemix.net
Apache License 2.0
16 stars 43 forks source link

app.js fails to start after move to Diego in Bluemix #5

Open chlau opened 7 years ago

chlau commented 7 years ago

The following lines in app.js causes an issue and results in app crashes. Diego no longer provides the VCAP_APP_HOST value. A temporary workaround is to change the default value from 'localhost' to '0.0.0.0'.

var port = (process.env.VCAP_APP_PORT || process.env.PORT || 3000); var host = (process.env.VCAP_APP_HOST || process.env.HOST || 'localhost');