Skip to content

keltroth/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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 '@keltroth/config';
console.log(config.application.port);

Update configuration value :

config.application.port=8080;
config.save();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published