uber-node / zero-config

A zero configuration configuration loader
MIT License
116 stars 10 forks source link

Remove 'dc' and 'dcvalue'. Allow to load from multiple directories instead. #14

Open lxe opened 9 years ago

lxe commented 9 years ago

I don't think the 'dc' config should be a first-class citizen in this module, or a strict requirement.

Instead, we should be able to provide multiple paths, if you need to load up some host-specific config:

var config = fetchConfig(__dirname, '/etc/datacenter', '/etc/my-app', /* ... */, { }); 
// Probably not the final interface... just something to think about.
Raynos commented 9 years ago

@lxe

data center specific configuration was a first class requirement of a production quality config loader and will stay so.

lxe commented 9 years ago

Data center requirement is not something most people, or even "production" deployments will ever need. This requirement is tightly coupled with pre-existing assumptions about your environment, making zero-config very non-generic.

Raynos commented 9 years ago

@lxe disagree. If you do not future proof your app you will fail.

An example of "datacenter" is staging vs prod, west vs east.

lxe commented 9 years ago

But it's an application/project specific feature, not a zero-config requirement. Zero-config should just load config, instead of managing/enforcing devops requirements.

An example of "datacenter" is staging vs prod, west vs east.

That's similar to what I'm suggesting... we can make environment-based loading generic and still satisfy datacenter requirements of projects that choose to adhere to it.

fakewaffle commented 9 years ago

I don't think it should be a requirement either.