How do I add a new unencrypted value to the configuration?
Objective: This article explains how to add a new unencrypted value to the platform configuration.
Steps:
- Open
components/configuration/configuration.ts
. - Append the value(s) you want to add.
- Open
components/configuration/types.ts
. - Append the properties and/or interfaces that match the values you added to the
IConfiguration
interface.
Example:
// components/configuration/configuration.ts
export const configuration = {
...
myValue: 123
}
// components/configuration/types.ts
export interface IConfiguration {
...
myValue: number
}
Usage:
import { configuration } from '@hectare/platform.components.configuration'
...
configuration.myValue
Related Articles: