From ce334cf6f46ee61baa0e4728809458a8dd6bc3e6 Mon Sep 17 00:00:00 2001 From: artbiit Date: Tue, 7 Apr 2026 17:48:16 +0900 Subject: [PATCH] feat: support custom environment file path via CUSTOM_ENV_PATH variable --- src/config/env.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)}`;