From 9acc375d99684b2fa701a9a89eba6ab6a36ca81d Mon Sep 17 00:00:00 2001 From: Tau Date: Mon, 14 Oct 2019 23:15:06 -0400 Subject: [PATCH] Tweak switchboard defaults --- src/switchboard.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/switchboard.ts b/src/switchboard.ts index 3108b09..99c550c 100644 --- a/src/switchboard.ts +++ b/src/switchboard.ts @@ -1,12 +1,11 @@ import logger from "debug"; -import * as os from "os"; const debug = logger("app:switchboard"); const cfgHostExt: string | undefined = process.env.HOST_EXT; const cfgHostInt: string | undefined = process.env.HOST_INT; -export const HOST_EXT = cfgHostExt !== undefined ? cfgHostExt : os.hostname(); -export const HOST_INT = cfgHostInt !== undefined ? cfgHostInt : "127.0.0.1"; +export const HOST_EXT = cfgHostExt !== undefined ? cfgHostExt : "127.0.0.1"; +export const HOST_INT = cfgHostInt !== undefined ? cfgHostInt : "0.0.0.0"; // // Core services. These ports cannot be changed. @@ -78,5 +77,7 @@ debug(`HOST_EXT: ${HOST_EXT} (Service host name sent to clients)`); debug(`HOST_INT: ${HOST_INT} (Bind address)`); if (cfgHostExt === undefined || cfgHostInt === undefined) { - debug("Warning: Check .env and env vars! Using unreliable fallback."); + debug( + "Using default host names, change them from the .env file if necessary." + ); }