OpenShift conf
This commit is contained in:
parent
3cc8e15aaa
commit
b0e9d6b7ec
|
@ -40,13 +40,15 @@ app.use(function(req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set ports and ip adress
|
// Set ports and ip adress
|
||||||
var server_port, server_ip_adress;
|
var server_port, server_ip_address;
|
||||||
if ( app.get('env') === 'development' ) {
|
if ( app.get('env') === 'development' ) {
|
||||||
server_port = 4000;
|
server_port = 4000;
|
||||||
server_ip_adress = 'localhost';
|
server_ip_address = 'localhost';
|
||||||
} else {
|
} else {
|
||||||
|
// Openhift conf
|
||||||
server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
||||||
server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';
|
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);
|
||||||
|
|
Loading…
Reference in New Issue