codeforhuntsville / Frontier

A civic app for finding whats near me
http://codeforhuntsville.com/
MIT License
9 stars 7 forks source link

Move configuration validation out of config/default.js #52

Closed chadxz closed 7 years ago

chadxz commented 9 years ago

The default configuration file is meant to be a template that can be copied and pasted to an environment name like production.js or local.js (see the node-config module docs for more info). The logic that is in that file complicates the structure and detracts from the simplicity that a config file should have.

If we want the config validation to be in its own file, we can use a simple module pattern to do that, like validateConfig(config) or something. As far as I'm concerned though, we can just validate the configuration inline in the main entry file.