diff --git a/src/config/env.ts b/src/config/env.ts index 0c3a0a7..233adda 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -1,6 +1,9 @@ import { config } from 'dotenv'; import { hostname } from 'os'; -config(); + +declare const CUSTOM_ENV_PATH: string; +const envPath = typeof CUSTOM_ENV_PATH !== 'undefined' ? CUSTOM_ENV_PATH : './.env'; +config({ path: envPath }); const generateInstanceId = () => { return process.env.INSTANCE_ID || hostname() || `kord-${Math.random().toString(36).substring(2, 7)}`;