Fixed env vars

This commit is contained in:
Vins 2023-07-25 11:02:08 +02:00
parent 4668fcb88f
commit 69585af4db

View File

@ -31,8 +31,6 @@ export class BackendVariables {
@IsNotEmpty() @IsNotEmpty()
public readonly APP_ROOT_URL!: string; public readonly APP_ROOT_URL!: string;
public readonly NODE_ENV = process.env.NODE_ENV;
@IsNotEmpty() @IsNotEmpty()
public readonly IDNOT_CONNEXION_URL!: string; public readonly IDNOT_CONNEXION_URL!: string;
@ -97,7 +95,7 @@ export class BackendVariables {
try { try {
await validateOrReject(this, validationOptions); await validateOrReject(this, validationOptions);
} catch (error: any) { } catch (error: any) {
if (process.env["NODE_ENV"] === "development") { if (process.env["ENV"] === "dev") {
throw error; throw error;
} }
console.error(error); console.error(error);