@kop/twelve-factor-config
v1.1.0
Published
An easy to use 12factor configuration for Node.js
Downloads
1
Maintainers
Readme
@kop/twelve-factor-config
An easy to use 12factor configuration for Node.js.
Configuration and usage
const config = new TwelveConfig({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']);