Skip to content
Snippets Groups Projects
Commit cb5ac7bd authored by michael.minelli's avatar michael.minelli
Browse files

Env => Use dotenv-expand

parent 3d11b3f0
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,12 @@
const path = require('node:path');
if ( process.env.NODE_ENV && process.env.NODE_ENV === 'production' ) {
require('dotenv').config();
const myEnv = require('dotenv').config();
require('dotenv-expand').expand(myEnv);
} else {
require('dotenv').config({ path: path.join(__dirname, '../.env.keys') });
require('dotenv').config({ DOTENV_KEY: process.env.DOTENV_KEY_DEVELOPMENT });
const myEnv = require('dotenv').config({ DOTENV_KEY: process.env.DOTENV_KEY_DEVELOPMENT });
require('dotenv-expand').expand(myEnv);
}
require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be after the dotenv.config() calls
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment