Avoid error if package ip is not installed
This commit is contained in:
parent
5226938ba3
commit
f9deb5ff9f
|
@ -2,7 +2,6 @@ var http = require('http');
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var jade = require('jade');
|
var jade = require('jade');
|
||||||
var pg = require('pg');
|
var pg = require('pg');
|
||||||
var ip = require('ip');
|
|
||||||
|
|
||||||
var favicon = require('serve-favicon');
|
var favicon = require('serve-favicon');
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ app.use(function(req, res) {
|
||||||
var serverPort, serverIpAddress;
|
var serverPort, serverIpAddress;
|
||||||
if ( isDev ) {
|
if ( isDev ) {
|
||||||
serverPort = 4000;
|
serverPort = 4000;
|
||||||
serverIpAddress = ip.address();
|
serverIpAddress = require('ip').address();
|
||||||
} else {
|
} else {
|
||||||
// Openhift conf
|
// Openhift conf
|
||||||
serverPort = process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
serverPort = process.env.OPENSHIFT_NODEJS_PORT || 8080;
|
||||||
|
|
Loading…
Reference in New Issue