Skip to content
Snippets Groups Projects
Select Git revision
  • 265c17592be1b43c344e13e35120ba8e73778053
  • main default protected
  • jw_sonar
  • v6.0.0 protected
  • bedran_exercise-list
  • ask-user-to-delete-exercises-on-duplicates
  • update-dependencies
  • jw_sonar_backup
  • add_route_assignments
  • 6.0.0-dev
  • 5.0.1
  • 5.0.0
  • 4.1.0
  • 4.0.0
  • 3.5.3
  • 3.5.2
  • 3.5.1
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.1
  • 3.0.0
29 results

InitialImports.ts

Blame
  • InitialImports.ts 603 B
    import path    from 'node:path';
    import cluster from 'node:cluster';
    import myEnv = require('dotenv');
    import dotenvExpand = require('dotenv-expand');
    
    
    if ( cluster.isPrimary ) {
        if ( process.env.NODE_ENV && process.env.NODE_ENV === 'production' ) {
            dotenvExpand.expand(myEnv.config());
        } else {
            myEnv.config({ path: path.join(__dirname, '../.env.keys') });
            dotenvExpand.expand(myEnv.config({ DOTENV_KEY: process.env.DOTENV_KEY_DEVELOPMENT }));
        }
    }
    
    
    require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be after the dotenv.config() calls