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

App => Load env file for dev or prod

parent 823f8052
Branches
Tags
No related merge requests found
require('dotenv').config(); // ATTENTION : This line MUST be the first of this file // Read from the .env file
require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be the second of this 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' ) {
require('dotenv').config();
} else {
require('dotenv').config({ path: path.join(__dirname, '../.env.keys') });
require('dotenv').config({ DOTENV_KEY: process.env.DOTENV_KEY_DEVELOPMENT });
}
require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be after the dotenv.config() calls
import WorkerRole from './process/WorkerRole'; import WorkerRole from './process/WorkerRole';
import ClusterManager from './process/ClusterManager'; 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