0.1.5 • Published 6 years ago

@uplatform/config v0.1.5

Weekly downloads
25
License
MIT
Repository
github
Last release
6 years ago

uPlatform - Config Component

npm version license

Usage

Step 1. Install the module

npm install --save @uplatform/config

Step 2. Configure the config sources

const configRetriever = new ConfigRetriever({
    stores: [
        {
            type: 'http',
            url: 'http//some-host/some-path/config.json',
        },
        {
            type: 'env',
            keys: {
                DATABASE_URL: 'database.url',
            },
        },
    ],
});

const config = await configRetriever.getConfig();

console.log(config.database.url);

Supported config sources

  • Environment variables
  • Files
  • HTTP endpoints

Supported config formats

  • JSON
  • YAML (requires npm install --save js-yaml)

TODO

  1. Describe a functionality of "optional" stores.
  2. Describe existing stores API

Roadmap

  • Implement an API for loading own config parses
  • Implement an API for loading own config stores
  • Add support of configuration state services (e.g. etcd, zookeeper, consul)

Authors

  • Karabutin Alex
0.1.5

6 years ago

0.1.1

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago