Package Exports
- @digifi/app-config-loader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@digifi/app-config-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
App-Config-Loader

Takes db config from either the Azure Key Vault or .env file and returns app configuration for the periodic app.
Required secrets (.env variables) are:
- CloudProvider (AWS or Azure)
- ProjectName (string)
- Environment (string)
- MongoUrl (string)
- MongoConfigurationDatabase (string)
- MongoReplicasetName (string)
- MongoServerKeepAlive (0 or 1)
- MongoUseNewUrlParser (0 or 1)
- MongoConnectTimeout (milliseconds)
- MongoSocketTimeout (milliseconds)
Getting Started
To begin using the app-config-loader, install the module by running the following command:
$ npm install @digifi/app-config-loader --saveUsage
After installing the app-config-loader, require the module at the top of files where you would like to use it.
const appConfigLoader = require('@digifi/app-config-loader');
const appConfig = appConfigLoader.appConfig();Other secrets can be retrived using
const someSecret = appConfigLoader.getSecret('SomeSecret');Example Config
Example .env
CloudProvider=AWS
ProjectName=Test App Config
Environment=development
MongoUrl=mongodb://localhost:27017
MongoConfigurationDatabase=config_db
MongoReplicasetName=SOME-shard-0
MongoServerKeepAlive=1
MongoUseNewUrlParser=1
MongoConnectTimeout=30000
MongoSocketTimeout=30000