1.0.1 • Published 7 years ago

moontils-config v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Moontils Config

Easily manage configuration values for an application.

How to use it

Install the npm package : npm install --save moontils-config

Import it into your code :

import Config from 'moontils-config'

const my_config = new Config(process.env.CONFIG_PATH || '.config');
my_config.setData('test', "Hello man!"); // Will store the value into the file
my_config.getData('test'); // Return the value
my_config.getData('env_variable', 'test'); // Return the ENV_VARIABLE from config, if not found, 
                                       // from env and at least return the default value