fileconfig (v-4.0.0)
Library for configuration file loading
install it
npm install fileconfig -g
use it
assuming you have a configuration folder as follow:
+ /path/to/config/folder
+ share
default.yml -> symlink to dev/alpha.yml
+ qa
+ dev
alpha.yml
with this content
- share/dev/alpha.yml
name: "alpha dev share"port: 9090dir: ${env.ALPHA_SHARE}
then you can fetch data as follow:
var FileConfig = ;var config = "/path/to/config/folder"; var defaultServer = configsharedefault;console; // out : alpha dev shareconsole; // out : 9090
dev
npm run test:watch # run tests and watch for changes
npm run lint # generate lint report
licence
Apache-2.0