wt-config

1.1.1 • Public • Published

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

Package Sidebar

Install

npm i wt-config

Weekly Downloads

1

Version

1.1.1

License

ISC

Last publish

Collaborators

  • recntrek_admin