From b0e9d6b7ec1c7ff9871a95c0dcd5c4209f3f55e3 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Wed, 6 May 2015 16:51:39 +0200 Subject: [PATCH] OpenShift conf --- server.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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);