From 5c4b83fa35c5024607776bf519bdcfddd7753ca8 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sat, 26 Mar 2022 14:41:27 +0200 Subject: [PATCH] config bind host --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5a73ce3..132c680 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,7 @@ import { logger } from './log/Logger'; import { Managed } from './managed'; const port = parseInt(process.env.PORT || '9129', 10); +const bind = process.env.BIND_ADDRESS || '0.0.0.0'; const cacheTTL = parseInt(process.env.CACHE_TTL || '2629746', 10); const dir = process.env.ZONEFILES || '.'; @@ -591,7 +592,7 @@ async function load() { } } - app.listen(port, () => logger.info(`listening on ${port}`)); + app.listen(port, bind, () => logger.info(`listening on ${port}`)); } if (process.argv.includes('genkey')) {