Config Property Stamp
A stamp (a composeable factory function) for use with stamp-it that creates a deep property called config storing information from config with its' cascading configuration capabilities or an override with an arbitary configuration file you provide.
By itself you aren't gaining much, used in combination with other stamps you gain the composeable power to add the consistent config interface of the config module in an expected way.
For more information on using config
You can find detailed instructions on using config on the node-config wiki pages;
Usage
-
You need a configuration file, either an arbitrary file or in your Env config folder per config.
-
For loading up an arbitrary single config file:
const path = require('path');
const ConfigPropertyStamp = require('config-property-stamp');
const configPropertyStamp = ConfigPropertyStamp.create(path.join(__dirname, 'test', 'default.json'));
- For loading up config from default config module location:
const path = require('path');
const ConfigPropertyStamp = require('config-property-stamp');
const configPropertyStamp = ConfigPropertyStamp.create();