npm.io
1.1.1 • Published 9 years ago

wt-config

Licence
ISC
Version
1.1.1
Deps
0
Vulns
0
Weekly
0

##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

Keywords