diff --git a/server.js b/server.js index 8904856..6191d57 100644 --- a/server.js +++ b/server.js @@ -40,13 +40,15 @@ app.use(function(req, res) { }); // Set ports and ip adress -var server_port, server_ip_adress; +var server_port, server_ip_address; if ( app.get('env') === 'development' ) { server_port = 4000; - server_ip_adress = 'localhost'; + server_ip_address = 'localhost'; } else { + // Openhift conf server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080; server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1'; } -app.listen(server_port, server_ip_adress); +console.log("Starting server on " + server_ip_address + ":" + server_port); +app.listen(server_port, server_ip_address);