From f9deb5ff9f3c5857bc83590b2668359294599463 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 13 Oct 2015 16:38:40 +0200 Subject: [PATCH] Avoid error if package ip is not installed --- server.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server.js b/server.js index 082f7a3..cfa0e16 100644 --- a/server.js +++ b/server.js @@ -2,7 +2,6 @@ var http = require('http'); var express = require('express'); var jade = require('jade'); var pg = require('pg'); -var ip = require('ip'); var favicon = require('serve-favicon'); @@ -105,7 +104,7 @@ app.use(function(req, res) { var serverPort, serverIpAddress; if ( isDev ) { serverPort = 4000; - serverIpAddress = ip.address(); + serverIpAddress = require('ip').address(); } else { // Openhift conf serverPort = process.env.OPENSHIFT_NODEJS_PORT || 8080;