What Is an Environment Variable?
How environment variables work
Instead of writing a value like an API key directly into your code, you store it as a name and value pair in the environment the app runs in. The code refers to it by name, and the actual value is supplied at runtime. This keeps sensitive values out of your codebase, and lets the same code use different values in different places, for example a test value while you build and a real one once the app is live.
Examples
When your app connects to a payment service, the secret key lives in an environment variable rather than in the code, so it isn't exposed if the code is shared. When you build on Emergent and add a feature that needs an outside service, the credential for it is stored this way, kept separate from the app you're building.
Frequently Asked Questions
Your Questions, Answered
Don't change this element unless you know what you are doing


