Env Config Provider
Repository: https://github.com/well-known-components/env-config-provider
Define the component
export async function initComponents(): Promise<AppComponents> {
const config = await createDotEnvConfigComponent({ path: ['.env.default', '.env'] })
return {
config
}
}
Get or require config properties
const distance = await config.requireNumber('DISTANCE')
const name = await config.getString('NAME')