npm.io
0.3.0 • Published 7 years ago

cfg-loader-webpack

Licence
ISC
Version
0.3.0
Deps
2
Size
5 kB
Vulns
1
Weekly
0

#Config loader

Cfg loader can load up configs for different environments from config files, env variables or newly can read secrets from filesystem. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files.

Install

# with npm
npm install cfg-loader

# or with Yarn
yarn add cfg-loader

Usage

import config, {load as configLoad} from 'cfg-loader';

configLoad(__dirname + '/../config');

// now the config property will contain the whole configuration 
console.log(config);