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