Environment Variables

Developers can communicate values from Lifeboat to the running Web App using Environment Variables. An Environment Variable is a key / value pair that affects the running service environment. It is recommended that you prefix your custom keys to avoid collision.

The Environment Variables editor is a very simple list with two columns. One column for the key and one for the value. Press the + button below the list to add a new row. Likewise, selecting a row and clicking - will remove the row. To edit a cell, select the row, then click once on the cell to edit. It's weird, but that's Xojo.

To access Environment Variables in Xojo use the System.EnvironmentVariable function:

var sValue as String = System.EnvironmentVariable("MyKey")
System.DebugLog(sValue)

Keys are case sensitive and are generally short compact words. Values are read until an end of line. Note that the FONTCONFIG variable is already set to the default fonts installation.

To activate the Environment Variables button, select / enable "Environment Variables editor" from the Preferences window. The checkbox is under the "Advanced Settings" group. The "Env. Vars" button will then appear on configure view.