env
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 4m2s

This commit is contained in:
2026-01-28 15:06:21 +01:00
parent 407b2227b3
commit d6c1d6bae6
7 changed files with 122 additions and 85 deletions

10
lib/load-env.ts Normal file
View File

@@ -0,0 +1,10 @@
import dotenv from 'dotenv';
import path from 'path';
/**
* Loads environment variables from .env file in development.
* This must be called before any other module that uses environment variables.
*/
if (typeof window === 'undefined' && process.env.NODE_ENV !== 'production') {
dotenv.config({ path: path.resolve(process.cwd(), '.env') });
}