|
|
|
@ -16,6 +16,7 @@ import {
|
|
|
|
|
import {Logging} from '../service/Logging'
|
|
|
|
|
import {RunLevelErrorHandler} from './RunLevelErrorHandler'
|
|
|
|
|
import {Unit, UnitStatus} from './Unit'
|
|
|
|
|
import * as fs from 'fs'
|
|
|
|
|
import * as dotenv from 'dotenv'
|
|
|
|
|
import {CacheFactory} from '../support/cache/CacheFactory'
|
|
|
|
|
|
|
|
|
@ -242,9 +243,12 @@ export class Application extends Container {
|
|
|
|
|
*/
|
|
|
|
|
protected bootstrapEnvironment(): void {
|
|
|
|
|
logIfDebugging('extollo.env', `.env path: ${this.basePath.concat('.env').toLocal}`)
|
|
|
|
|
const path = this.basePath.concat('.env').toLocal
|
|
|
|
|
if ( fs.existsSync(path) ) {
|
|
|
|
|
dotenv.config({
|
|
|
|
|
path: this.basePath.concat('.env').toLocal,
|
|
|
|
|
path,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
logIfDebugging('extollo.env', process.env)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|