Set environment variables locally
You can set environment variables to test them in your local preview.
To set an environment variable locally:
In your CLI, close the local server if it is running.
Run the following command:
Run the following command to test it:
You will see the word 'red' appear on your CLI.
The environment variable is now available in the runtime environment for your component.
Start your local development server:
dxp-next cmp dev components