0.0.6 • Published 2 years ago

@keltroth/config v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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();