0.1.5 • Published 5 years ago

@uplatform/config v0.1.5

Weekly downloads
25
License
MIT
Repository
github
Last release
5 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

5 years ago

0.1.1

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago