1.1.1 • Published 4 years ago

wt-config v1.1.1

Weekly downloads
17
License
ISC
Repository
-
Last release
4 years ago

##Usage

wt-config module allows you to share your configurations inside you project as a singoptionallyof access. In addition it allows you to share configurations with other node modules without needing to embbed the configuration in those modules. ####Instalation

npm i wt-config --save

####In main project set configurations

let Config = require('wt-config');
Config.set = require(/*json | path to configurations*/);
//optionaly merge with default configurations
Config.mergeDefault(require(/*json | path to default config*/));

####In any other place in project or node modules

const config = require('wt-config').get;
/*now config will contain the configurations set in main project*/

####Check environment within the project

Config.getEnvironment();

When runnig the application set the environment variable NODE_ENV=PRODUCTION|STAGING|DEVELOPMENT

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago