Initial commit
**Motivations:** - Initialisation du versionning git pour le projet **Root causes:** - N/A (Nouveau projet) **Correctifs:** - N/A **Evolutions:** - Structure initiale du projet - Ajout du .gitignore **Pages affectées:** - Tous les fichiers
This commit is contained in:
10
server/env.js
Normal file
10
server/env.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Load .env from project root before any other module that uses process.env.
|
||||
* Must be imported first in index.js.
|
||||
*/
|
||||
import dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
dotenv.config({ path: path.join(__dirname, "..", ".env"), override: true });
|
||||
Reference in New Issue
Block a user