From 8d2e110e3d4938228749b5a8124c680b34897e51 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 14 Jun 2022 17:43:42 +0200 Subject: [PATCH] Feature/change default host (#1013) * Change default host to 0.0.0.0 * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/main.ts | 2 +- apps/api/src/services/configuration.service.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf032d78..b58d3d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Changed the default `HOST` to `0.0.0.0` + ## 1.158.1 - 12.06.2022 ### Added diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 546cbbf3..7b4ea21e 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -20,7 +20,7 @@ async function bootstrap() { }) ); - const host = process.env.HOST || 'localhost'; + const host = process.env.HOST || '0.0.0.0'; const port = process.env.PORT || 3333; await app.listen(port, host, () => { logLogo(); diff --git a/apps/api/src/services/configuration.service.ts b/apps/api/src/services/configuration.service.ts index cc80c146..16f2e9e3 100644 --- a/apps/api/src/services/configuration.service.ts +++ b/apps/api/src/services/configuration.service.ts @@ -31,7 +31,7 @@ export class ConfigurationService { GOOGLE_SHEETS_ACCOUNT: str({ default: '' }), GOOGLE_SHEETS_ID: str({ default: '' }), GOOGLE_SHEETS_PRIVATE_KEY: str({ default: '' }), - HOST: host({ default: 'localhost' }), + HOST: host({ default: '0.0.0.0' }), JWT_SECRET_KEY: str({}), MAX_ITEM_IN_CACHE: num({ default: 9999 }), MAX_ORDERS_TO_IMPORT: num({ default: Number.MAX_SAFE_INTEGER }),