Environment variables

Application-specific settings can be stored in environment variables. Environment variables are great for storing values that shouldn’t be kept directly in the code for security or code hygiene reasons, and which shouldn’t transfer with the source code when the app is forked.

Environment variables are stored encrypted-at-rest.

You can define an environment variable schema at Settings > App Info > Environment variables schema.

Environment variable names must be strings (case-sensitive), with the following restrictions:

  • It can't be blank.
  • Its length can't exceed 30 characters.
  • It must be unique across the application (i.e., there can't be two environment variables in your application with the same name).
  • Only alphanumeric characters and the period, underscore and dash are allowed.
  • The first character may not be a numerical character or a dash.

Environment variable values can be any valid string, number, or boolean. There are no length or character restrictions. If left blank, they will default to null.

Programmatic interface

Please see the JavaScript operation documentation for information on programmatically accessing environment variables.

Development context

When running operations through the Transposit console the development context is used.

Each developer has their own development context per application in the Transposit console. The environment variables set in that context can be managed under Code > Auth & settings. A developer can only see their own settings.

Production context

When deployed operations are executed through deployment or a scheduled task, the production context is used.

The environment variables in the production context can be viewed and managed under Deploy > Environment Variables.