-
Notifications
You must be signed in to change notification settings - Fork 37
EnvironmentParameters
Mauro Gadaleta edited this page May 5, 2026
·
3 revisions
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 = nodeEnv
}
get env () {
return this._env
}
}
export default FooCopyright © 2023-2024 Mauro Gadaleta