hgi-config
v0.1.5
Published
Node package for connecting to flow-config service and getting authorization tokens for the flow
Downloads
21
Readme
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 asSHARED_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.