Carrooi/Node-DependencyInjection

get paramater from config from di object

bazo opened this issue · 2 comments

bazo commented

currently there's no way(or i am stupid) to get a parameter defined in config.json from the resulting di object.

i need to setup an express app via app.set('key', 'value')

You are definitely not stupid, I just forgot it. So please wait a moment and I will add it.

Now you can use di.parameters or for example di.getParameter('database.user'). Just take a look in updated documentation 09166a5 ;-)