feathersjs-ecosystem / configuration

[MOVED] A plugin for configuring a Feathers application
https://github.com/feathersjs/feathers
MIT License
28 stars 15 forks source link

Nested configuration #38

Closed sylvainlap closed 7 years ago

sylvainlap commented 7 years ago

Hi,

It is said that feathers-configuration is a simple wrapper on node-config. However, with node-config, if you have nested configuration, like that:

{
  "Customer": {
    "dbConfig": {
      "host": "prod-db-server"
    },
    "credit": {
      "initialDays": 30
    }
  }
}

you can access the host attribute by using config.get('Customer.dbConfig.host'). However, with feathers-configuration, this dot notation do not work.

daffl commented 7 years ago

Mainly because the underlying Express app.set and app.get() don't support it. It'll be app.get('Customer').config.host instead. You could also require('config') directly and use it the way it is described.

sylvainlap commented 7 years ago

OK thanks. I close the issue.