trailsjs / trails

:evergreen_tree: Modern Web Application Framework for Node.js.
http://trailsjs.io
Other
1.67k stars 70 forks source link

V3 `this.app.config.get` doesn't behave as expected #320

Open matteozambon89 opened 6 years ago

matteozambon89 commented 6 years ago

@jaumard I think I found another issue with the config.

On trailpack-koa I have:

// index.js
...
configure() {
...
// line 56
this.app.config.set('web', result[1])
...
}
...

which updates the current configuration with various defaults and checks using JOI.

Now if on my app or another trailpack I see this result:

this.app.config.get('web.server') // undefined
this.app.config.get.web.server // 'koa'

I've been careful to ask for this config value after trailpack-koa 's configure method is completed.

jaumard commented 6 years ago

Try with the last version v3.2.1 do you still have the issue ?