@highly-attractive-people/conman-nconf-source

1.1.0 • Public • Published

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

Options Description Type Default
name name of the source to be used instead of the type string
key key where the source data will be included inside the config string, 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();

Readme

Keywords

none

Package Sidebar

Install

npm i @highly-attractive-people/conman-nconf-source

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

9.86 kB

Total Files

7

Last publish

Collaborators

  • helior
  • jepz20