diff --git a/README.md b/README.md index bf38280..1df660e 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,8 @@ services: KIOSK_EMAIL: 'false' # Enable/disable a printer for Kiosk Vouchers (this automatically prints vouchers), currently supported: escpos ip (Example: 192.168.1.10) KIOSK_PRINTER: '' + # Specifies the IP address to bind to (such as :: in IPv6 environments) + BIND_ADDRESS: '0.0.0.0' # Sets the application Log Level (Valid Options: error|warn|info|debug|trace) LOG_LEVEL: 'info' # Sets the default translation for dropdowns diff --git a/modules/variables.js b/modules/variables.js index 9526b3d..c71ee7e 100644 --- a/modules/variables.js +++ b/modules/variables.js @@ -47,6 +47,7 @@ module.exports = { kioskHomepage: config('kiosk_homepage') || (process.env.KIOSK_HOMEPAGE === 'true') || false, kioskEmail: config('kiosk_email') || (process.env.KIOSK_EMAIL === 'true') || false, kioskPrinter: config('kiosk_printer') || process.env.KIOSK_PRINTER || '', + bindAddress: config('bind_address') || process.env.BIND_ADDRESS || '0.0.0.0', logLevel: config('log_level') || process.env.LOG_LEVEL || 'info', translationDefault: config('translation_default') || process.env.TRANSLATION_DEFAULT || 'en', translationHiddenLanguages: config('translation_hidden_languages') || process.env.TRANSLATION_HIDDEN_LANGUAGES || '', diff --git a/server.js b/server.js index 83f0978..d042811 100644 --- a/server.js +++ b/server.js @@ -205,8 +205,8 @@ app.disable('x-powered-by'); /** * Start listening on port */ -app.listen(3000, '0.0.0.0', async () => { - log.info(`[App] Running on: 0.0.0.0:3000`); +app.listen(3000, variables.bindAddress, async () => { + log.info(`[App] Running on: ${variables.bindAddress}:3000`); await updateCache(); // Run tasks every 15 minutes