From 0517109c264cf2f21de24c81d1286ccb2992c11b Mon Sep 17 00:00:00 2001 From: chpark Date: Thu, 23 Apr 2026 01:09:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20dotenv=20optional=20import=20(prod?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=8A=94=20k8s=20env=20=EC=82=AC=EC=9A=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main.ts b/server/src/main.ts index c9f4ef8..dc75bce 100644 --- a/server/src/main.ts +++ b/server/src/main.ts @@ -1,4 +1,5 @@ -import 'dotenv/config'; +// Load .env when running locally; no-op when env is injected by k8s +try { require('dotenv/config'); } catch {} import { buildApp } from './app'; const PORT = Number(process.env.PORT ?? 4000);