1.1.0 • Published 4 years ago

@highly-attractive-people/conman-nconf-source v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

nconf source for conman

Uses nconf to import:

  1. Environment Variables
  2. Arguments
  3. Files from
    • ${appRoot}/config/${appEnv}.env.json
    • ${appRoot}/config/default.env.json
    • ${__dirname}/../defaults/${appEnv}.env.json
    • ${__dirname}/../defaults/default.env.json

Options

OptionsDescriptionTypeDefault
namename of the source to be used instead of the typestring
keykey where the source data will be included inside the configstring, if no key is provided data is at the root of the config

Use example:

const conman = require('@highly-attractive-people/conman');
const nconfSource = require('@highly-attractive-people/conman-nconf-source');

const nconf = nconfSource({ name: 'defaultNconf' }); // you can assign a name

conman()
  .addSource(nconf)
  .build();