-
Notifications
You must be signed in to change notification settings - Fork 34
EnvironmentParameters
Mauro Gadaleta edited this page Jan 9, 2020
·
1 revision
Using env vars to configure applications is a common practice to make your applications truly dynamic.
To inject this parameters as arguments you need to:
For Example
services:
foo:
class: ./../foo
arguments: ['%env(NODE_ENV)%']
And then use it in your foo class
class Foo {
constructor (nodeEnv) {
this._env = env
}
get env () {
return this._env
}
}
export default Foo
Copyright © 2023-2024 Mauro Gadaleta