@keltroth/config
Configuration loader
How to use
Install
npm install --save @keltroth/config
Create a config.json
file :
{
"application": {
"port": 8080
}
}
Override value with env
To enable 12 factor app way of overriding config :
APPLICATION_PORT=9090
Use configuration value :
import {config} from 'mereconf';
console.log(config.application.port);
Update configuration value :
config.application.port=8080;
config.save();