feat: support custom environment file path via CUSTOM_ENV_PATH variable

This commit is contained in:
이정수 2026-04-07 17:48:16 +09:00
parent ef15273a02
commit ce334cf6f4
1 changed files with 4 additions and 1 deletions

View File

@ -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)}`;