From 076cdffdc9166a17870974f40533a844a8d55df0 Mon Sep 17 00:00:00 2001 From: Erik <81252038+Captain8771@users.noreply.github.com> Date: Tue, 12 Dec 2023 00:09:09 +0100 Subject: [PATCH] Add config.http.host option to config. (#33) --- config/default.js | 1 + http.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/default.js b/config/default.js index a34d5c2..811398b 100644 --- a/config/default.js +++ b/config/default.js @@ -175,6 +175,7 @@ const _config = { enabled: false, port: 4242, proto: 'https', + host: "localhost", fqdn: os.hostname(), ttlSecs: 30 * 60, staticDir: HTTP_STATIC_DIR, diff --git a/http.js b/http.js index 2149e29..197a97a 100644 --- a/http.js +++ b/http.js @@ -273,7 +273,7 @@ redisListener.subscribe(PREFIX, (err) => { app.close(); }); - app.listen(config.http.port, (err, addr) => { + app.listen({host: config.http.host, port: config.http.port}, (err, addr) => { if (err) { throw err; }