From 6de775a1bf1880acc4d7bc54d2244b44dc838bed Mon Sep 17 00:00:00 2001 From: UnexomWid Date: Sat, 30 Apr 2022 00:30:30 +0300 Subject: [PATCH 1/2] add: hostname binding support --- app.js | 4 ++-- load-config.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 1b43754..46cc599 100644 --- a/app.js +++ b/app.js @@ -43,8 +43,8 @@ async function run() { await accountApp.init(); await syncApp.init(); - console.log('Listening on ' + config.port + '...'); - app.listen(config.port); + console.log('Listening on ' + config.hostname + ':' + config.port + '...'); + app.listen(config.port, config.hostname); } run().catch(err => { diff --git a/load-config.js b/load-config.js index 11ef2b6..6f707be 100644 --- a/load-config.js +++ b/load-config.js @@ -9,6 +9,7 @@ try { config = { mode: 'development', port: 5006, + hostname: 'localhost', serverFiles: join(root, 'server-files'), userFiles: join(root, 'user-files') }; From 0ad3f12686932b09678dc3571acfc6e55658f25f Mon Sep 17 00:00:00 2001 From: UnexomWid Date: Sat, 30 Apr 2022 00:33:59 +0300 Subject: [PATCH 2/2] modify: default hostname --- load-config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load-config.js b/load-config.js index 6f707be..933ce99 100644 --- a/load-config.js +++ b/load-config.js @@ -9,7 +9,7 @@ try { config = { mode: 'development', port: 5006, - hostname: 'localhost', + hostname: '0.0.0.0', serverFiles: join(root, 'server-files'), userFiles: join(root, 'user-files') };