hgi-config

0.1.5 • Public • Published

Flow Config Client

This package provides a simple interface for authenticating with and retrieving configuration data from the flow-config service. It allows Node.js applications to dynamically fetch configuration details, such as API keys and service endpoints, in a secure manner. Please note that using this package to transmit sensitive information over HTTP may be vulnerable to Man-In-The-Middle (MITM) attacks. It is strongly recommended to use HTTPS in production environments.

Features

  • Authentication with the flow-config service using a shared secret.
  • Fetching service-specific configuration data securely.
  • Dynamically setting environment variables based on fetched configuration.

Installation

To install the package, run the following command in your Node.js project:

npm install hgi-config --save

Usage

Before using the functions provided by this package, ensure the following environment variables are set:

  • SHARED_SECRET: The shared secret used for authentication with the flow-config service. Has to be the same as SHARED_SECRET in flow-config container.
  • CONFIG_SERVICE_URL: The URL of the flow-config service. Defaults to http://localhost:8080/flow-config/api if not specified.

Readme

Keywords

Package Sidebar

Install

npm i hgi-config

Weekly Downloads

6

Version

0.1.5

License

ISC

Unpacked Size

4.1 kB

Total Files

3

Last publish

Collaborators

  • haergi