3.0.0 • Published 2 years ago
@stratech/node-get-config v3.0.0
module-node-get-config
StraTech Configuration fetcher module for NodeJS.
Usage
- Require this module in your NodeJS service to fetch its configuration from the configuration service over NATS, based it's
app_name.
Note that the configuration service will need to be set up to support your service prior to using this module.
- Invoke the
startupfunction to fetch the config for your service.
Example:
const get_config = require('@stratech/node-get-config');
var config = await get_config.startup();Note that the startup function resolves or rejects a promise, so you will need to use async/await (with try/catch), or .then().catch().