11 lines
325 B
TypeScript
11 lines
325 B
TypeScript
const path = require("path");
|
|
const dotenv = require("dotenv");
|
|
const dotenvExpand = require("dotenv-expand");
|
|
|
|
// Load the root .env file
|
|
const envPath = path.resolve(__dirname, ".env");
|
|
const envConfig = dotenv.config({path: envPath});
|
|
|
|
// Expand variables (e.g., `${VAR}`) in the .env file
|
|
dotenvExpand.expand(envConfig);
|