Set variables

Give each environment its own variables, the settings it hands to your app such as LOG_LEVEL, so Production can differ from Preview.

Before you start

You need a project. See Create a project.

Add a variable

  1. In your project, open Runtime > Environments.
  2. Click Production.
  3. Under Environment variables, click Add variable.
  4. Enter a Key, such as LOG_LEVEL.
  5. Enter a Value, such as debug.
  6. Click Add variables. You should now see "Variable added" and LOG_LEVEL under Environment variables, with its value hidden as ••••••••.

To add several at once, open Paste in the dialog and paste KEY=value lines instead.

To change a value, add the same Key again with the new Value. Studio says "Variable saved".

Delete a variable

  1. Open the ⋯ menu on the variable's row.
  2. Click Delete. Anything that reads it fails until you add it again.
  3. Click Delete variable. You should now see "No variables yet." under Environment variables.

Next steps