Skip to main content

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:

  1. Open components/configuration/configuration.ts.
  2. Append the value(s) you want to add.
  3. Open components/configuration/types.ts.
  4. 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: