EuNodeConfig
NOTE, THIS IS A WORK IN PROGRESS AND NOT COMPLETE AT THIS TIME To see what works, look at the test(s).
Node config is a simple library for loading configuration from the environment and various file formats. It allows your users to specify their configs in various formats and takes care of parsing the formats appropriately for you.
Usage
This module exports only one function: loadConfig
.
var configLoader = ;configLoader; // Alternately, promise styleconfigLoader
Formats supported
.yaml, .json, and .js
From the above description, your config will be loaded from a file if it begins with your filePrefix (default config) and ends with ".json" or ".yaml". If you enable "loadJsConfigs" it will also load .js extension files.
Environment variables
Environment variables matching either your config key or your config key converted to upper-case and with camelcasing normalized to underscore seperation will be used.
For example, the config key "configKey" will be accessed as either the environment variable "configKey" or "CONFIG_KEY"