Skip to content

kop/node-twelve-factor-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@kop/twelve-factor-config

CircleCI Scrutinizer Package version Monthly downloads License

An easy to use 12factor configuration for Node.js.

Configuration and usage

const config = new ConfigParser({prefix: "MY_APP_"});
config.val('ENV_VAR_NAME', 'default value');
config.string('ENV_VAR_NAME', 'default value'); // works same as previous
config.number('ENV_VAR_NAME', 100);
config.boolean('ENV_VAR_NAME', true);
config.range('ENV_VAR_NAME', 'default value', ['default value', 'another value']);