Search code examples
node.jsopenshiftsteambot

Node.JS SteamBot on openshift


i´m trying to host my node.js steambot on openshift, i haven´t used it before, so basicly what i´m trying is to Commit a basic "in my eyes, not a server" to their nodejs "hosting".

so, when i commit the files and such, everytime the app starts, it tells me that "port 8080 is not available" and so it can´t start. idk what is blocking the port so.

what could be the issue ?

regards


Solution

  • OpenShift will routinely check your application to see if it is working correctly. The expectation is that all apps are "web apps", so if you are not listening on the correct port, your app may get rebooted, suspended, or may fail to start correctly.

    For your bot to appear to be in good health, you'll need to bind to (process.env.OPENSHIFT_NODEJS_PORT ,process.env.OPENSHIFT_NODEJS_IP), as described in "Run Your Nodejs projects on OpenShift in Two Simple Steps".

    Returning a simple HTTP 200 on "/" should be enough to convince OpenShift that your bot (web app) is in good health.