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')) {