Closed alberto-leon-crespo closed 6 years ago
@alberto-leon-crespo How are you defining parameters? Have you checked the documentation about this? https://github.com/zazoomauro/node-dependency-injection/wiki/Parameters
// add a new parameter
container.setParameter('mailer.transport', 'sendmail')
in your case would be something like:
for(let key of Object.keys(process.env)){
container.setParameter(key, process.env[key])
}
I need to use this parameters in yaml config file. I can get this parameters from controller but i cant pass registered parameters in the container in service arguments.
container.setParameter especify a first argument called "nameSpaceURI"
I solve the problem, process.env variable dont register fine variables in my express application. Fix it
I load a cnfig service yaml file. I have a instance to ContainerBuilder and i need to register config params before load yamel file. When i compile container y and put in my services.yaml file references to config params y get undefined. I register service like this:
And i prepare container like this;
What is wromg?