From 106aef579f6f5a14e43a6b099204f01d8812978c Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Sat, 9 Dec 2017 02:21:55 +0100 Subject: [PATCH 1/4] Add new config item: listen_address The IP address to bind the HTTP server to --- server/config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/config.js b/server/config.js index e3e97b2a..55561afc 100644 --- a/server/config.js +++ b/server/config.js @@ -14,6 +14,11 @@ const conf = convict({ default: 'localhost', env: 'REDIS_HOST' }, + listen_address: { + format: "ipaddress", + default: "127.0.0.1", + env: "IP_ADDRESS" + }, listen_port: { format: 'port', default: 1443, From c8e168aa3e796466137f5f8d8f831f37fea4e3d4 Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Sat, 9 Dec 2017 02:22:36 +0100 Subject: [PATCH 2/4] Use new config item 'listen_address' in prod --- server/prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/prod.js b/server/prod.js index 2840f9ec..0515faf7 100644 --- a/server/prod.js +++ b/server/prod.js @@ -24,4 +24,4 @@ app.use( app.use(pages.notfound); -app.listen(config.listen_port); +app.listen(config.listen_port,config.listen_address); From b80ee8d7786272e1070668c31bb92ece99601b65 Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Sat, 9 Dec 2017 02:34:33 +0100 Subject: [PATCH 3/4] Make the linter happy :) --- server/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/config.js b/server/config.js index 55561afc..7f4b2d03 100644 --- a/server/config.js +++ b/server/config.js @@ -15,9 +15,9 @@ const conf = convict({ env: 'REDIS_HOST' }, listen_address: { - format: "ipaddress", - default: "127.0.0.1", - env: "IP_ADDRESS" + format: 'ipaddress', + default: '127.0.0.1', + env: 'IP_ADDRESS' }, listen_port: { format: 'port', From 6f27c6e4aa41fc065c5e014ddb7028dc9080068f Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Thu, 21 Dec 2017 22:10:42 +0100 Subject: [PATCH 4/4] Change default bind address to 0.0.0.0 --- server/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/config.js b/server/config.js index 7f4b2d03..4bad58d8 100644 --- a/server/config.js +++ b/server/config.js @@ -16,7 +16,7 @@ const conf = convict({ }, listen_address: { format: 'ipaddress', - default: '127.0.0.1', + default: '0.0.0.0', env: 'IP_ADDRESS' }, listen_port: {