From 6de775a1bf1880acc4d7bc54d2244b44dc838bed Mon Sep 17 00:00:00 2001
From: UnexomWid <uw@exom.dev>
Date: Sat, 30 Apr 2022 00:30:30 +0300
Subject: [PATCH] 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')
   };
-- 
GitLab