Resolve existing scaffolding for env function
This commit is contained in:
parent
c0e1e1d2a4
commit
4b341b43e0
@ -4,7 +4,7 @@ import { Logging } from '../service/logging/Logging.ts'
|
|||||||
import StandardLogger from '../service/logging/StandardLogger.ts'
|
import StandardLogger from '../service/logging/StandardLogger.ts'
|
||||||
import { isLoggingLevel } from '../service/logging/types.ts'
|
import { isLoggingLevel } from '../service/logging/types.ts'
|
||||||
import Utility from '../service/utility/Utility.ts'
|
import Utility from '../service/utility/Utility.ts'
|
||||||
import { make } from '../../../di/src/global.ts'
|
import {container, make} from '../../../di/src/global.ts'
|
||||||
import 'https://deno.land/x/dotenv/load.ts'
|
import 'https://deno.land/x/dotenv/load.ts'
|
||||||
import { Container } from '../../../di/src/Container.ts'
|
import { Container } from '../../../di/src/Container.ts'
|
||||||
import { Inject } from '../../../di/src/decorator/Injection.ts'
|
import { Inject } from '../../../di/src/decorator/Injection.ts'
|
||||||
@ -18,7 +18,8 @@ import { path } from '../external/std.ts'
|
|||||||
* @return any
|
* @return any
|
||||||
*/
|
*/
|
||||||
const env = (name: string, fallback?: any) => {
|
const env = (name: string, fallback?: any) => {
|
||||||
const scaffolding = make(Scaffolding)
|
// const scaffolding = make(Scaffolding)
|
||||||
|
const scaffolding = container.get_existing_instance(Scaffolding)
|
||||||
return scaffolding.env(name) ?? fallback
|
return scaffolding.env(name) ?? fallback
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user