Simple Config Library
This is a simple config library for use in NodeJS. Get started with:
npm install --save better-config
Usage
var config = ;
Here are the ways to set the config - For a big project you probably want to set the defaults, then set a config.json file (if they have one). If there is no file, the set call does nothing.
// Plain vanilla object settingconfigmessage = 'hello world'; // Set using the set functionconfig; // Set using a json fileconfig; // Set using a js fileconfig; // Set using a functionconfig;
You can simply access the config like you would any other object:
// Plain vanilla object getconsole // Get by functionconsole
Contributions welcome!
Credits
This library was initially made by the awesome team of engineers at Diamond.
If you haven't already, make sure you install Diamond!