From 854ac6e1abef0ed78621702b110ba2007f634519 Mon Sep 17 00:00:00 2001 From: GaryCraft Date: Mon, 13 May 2024 14:21:48 -0600 Subject: [PATCH] Actually default UD_ENV to "production" --- docs/env_vars.md | 2 +- src/engine/utils/Env.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/env_vars.md b/docs/env_vars.md index 7119817..94df6e7 100644 --- a/docs/env_vars.md +++ b/docs/env_vars.md @@ -3,7 +3,7 @@ UtilityDust supports many environment variables to customize its behavior. The following is a list of all the environment variables that UtilityDust supports: ## General -- `NODE_ENV`: The environment in which the application is running. Can be `development` or `production`. If not set, UtilityDust will default to `production`. +- `UD_ENV`: The environment in which the application is running. Can be `development` or `production`. If not set, UtilityDust will default to `production`. ## Configuration - `UD_CONFIG_PATH`: The path to the configuration directory. If not set, UtilityDust will use the default configuration directory. Which is `config` in the working directory. diff --git a/src/engine/utils/Env.ts b/src/engine/utils/Env.ts index 2b573b2..3152a7b 100644 --- a/src/engine/utils/Env.ts +++ b/src/engine/utils/Env.ts @@ -8,7 +8,7 @@ export const defaultcfgpath = `${getProcessPath()}/config`; export class InherentConfig { private singleton: InherentConfig | null = null; - node_env = process.env.NODE_ENV || "development"; + node_env = process.env.UD_ENV || "production"; cfg_path = process.env.UD_CONFIG_PATH || defaultcfgpath; allow_insecure_config = process.env.UD_ALLOW_INSECURE_CONFIG === "true" || false; constructor() {