config-manager

Config manager that helps you manage the environment vars for your different apps across all of your deployment environments. Typical environments might include local, dev, test, stage, and prod, although you can have as many as you want, and call them whatever you like. config-manager also supports having a default.json file which contains global config values shared across apps.

config-manager

Config manager that helps you manage the environment vars for your different apps across all of your deployment environments. Typical environments include local, dev, test, and prod, although you can have as many as you want, and call them whatever you like. config-manager also supports having a default.json file which contains global config values shared across apps.

First, install it in your project's directory:

npm install config-manager

Then add this line to your app's configuration:

var configManager = require('config-manager')

Finally, initialize the manager with the base path of your config files, the target env, and the name of your app:

configManager.init([BASE_PATH_TO_CONFIG_FILES], [TARGET_ENV], [NAME_OF_APP], function(conf){
  //conf object contains the resolved config values for the TARGET_ENV for the target app
});