wt-config
v1.1.1
Published
helps manage configurations across a project with many node modules with configurations.
Downloads
5
Maintainers
Readme
##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