node-app-config
Simple class that parses a config json file and exposes the contents on the class
Requires Node v6.x +
typescript friendly
install
$npm install node-app-config
usage
var AppConfig = ; var config = ; //this will work if your config is in the process.cwd() and the file is named config.json console;console;
alternatively you can specify a config file path in the constructor
var AppConfig = ; //this config file path can be relative to process.cwd()//to use an absolute path use new AppConfig([path], false);var config = '../path/to/config'; console;console;
ERRORS
the object constructor will throw exceptions if the config file does not exist or is invalid json
license
MIT