From cb8f4017e55c2b7c6647d23e655e0e59d7af8da5 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Mon, 16 Oct 2017 12:01:59 -0400 Subject: [PATCH] use host from HOST environmental variable --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 2bd4dcf5..4fffd846 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,8 @@ -var app = require('./app'), - port = ( process.env.PORT || 3100 ); +const app = require('./app'), + port = ( process.env.PORT || 3100 ), + host = ( process.env.HOST || 'localhost' ); /** run server on the default setup (single core) **/ -console.log( 'pelias is now running on port ' + port ); -app.listen( port ); +console.log( `pelias is now running on ${host}:${port}` ); +app.listen( port, host );