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);