diff --git a/.env.example b/.env.example index 26f6507..5f3fb65 100644 --- a/.env.example +++ b/.env.example @@ -4,3 +4,4 @@ PORT=8080 REVERSE_PROXY=true # only for reverse proxy; see docs PROXY_RES=true +SWAGGER=false # whether to add API docs route or not diff --git a/src/config/config.service.ts b/src/config/config.service.ts index ec3e1a2..3ff93e3 100644 --- a/src/config/config.service.ts +++ b/src/config/config.service.ts @@ -5,6 +5,7 @@ export class ConfigService { public readonly port: number; public readonly reverse_proxy: boolean; public readonly proxy_res: boolean; + public readonly swagger: boolean; constructor() { config(); @@ -15,6 +16,7 @@ export class ConfigService { this.reverse_proxy = this.parseBool(process.env.REVERSE_PROXY, false); this.proxy_res = this.parseBool(process.env.PROXY_RES, true); + this.swagger = this.parseBool(process.env.SWAGGER, false); } parseBool(value: string | undefined, def: boolean): boolean {