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

App => Group all dotenv imports in one file

parent cbf8dfc4
No related branches found
No related tags found
No related merge requests found
import path from 'node:path';
if ( process.env.NODE_ENV && process.env.NODE_ENV === 'production' ) {
const myEnv = require('dotenv').config();
require('dotenv-expand').expand(myEnv);
} else {
require('dotenv').config({ path: path.join(__dirname, '../.env.keys') });
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
// Read from the .env file
// ATTENTION : This lines MUST be the first of this file (except for the path import)
const path = require('node:path');
if ( process.env.NODE_ENV && process.env.NODE_ENV === 'production' ) {
const myEnv = require('dotenv').config();
require('dotenv-expand').expand(myEnv);
} else {
require('dotenv').config({ path: path.join(__dirname, '../.env.keys') });
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
require('./InitialImports'); // ATTENTION : These lines MUST be the first of this file
import WorkerRole from './process/WorkerRole';
import ClusterManager from './process/ClusterManager';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment