Backstage - How to consume environment variables?

Viewed 17

The Backstage documentation states that all environment variables must be "exposed" through the central configuration file, app-config.yaml.

However, the official documentation is not clear about the use of these variables, for example, in the .ts and .tsx files.

Could someone help, or exemplify with codes how this use is made?

1 Answers

Had the same question, ended up just using process.env.ENV_VAR in the typescript files and exporting environment variables before starting Backstage.

Related