From 797aa6dc96363c41df339f49bc97d92b3067139a Mon Sep 17 00:00:00 2001 From: Erick Hitter <services@ethitter.com> Date: Sat, 14 Jan 2017 12:24:51 -0800 Subject: [PATCH] Allow listener to be configured for use outside of Heroku --- config-sample.json | 1 + index.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config-sample.json b/config-sample.json index f766bcd..769a6bb 100644 --- a/config-sample.json +++ b/config-sample.json @@ -1,4 +1,5 @@ { "apikey": "", + "listener": "0.0.0.0", "port": 9001 } diff --git a/index.js b/index.js index c1b87dc..788693e 100644 --- a/index.js +++ b/index.js @@ -114,6 +114,6 @@ app.post('/post', function(req, res){ }); //tells Node which port to listen on -app.listen(app.get('port'), function() { - console.log('Weather on the Slash is running on port', app.get('port')); +app.listen( app.get('port'), config.listener, function() { + console.log( 'Weather on the Slash is running on', config.listener, 'and port', app.get('port') ); }); -- GitLab