An environment variable lets an operating system, runtime, or hosting platform provide configuration when an application starts. Common uses include service endpoints, feature flags, environment names, and references to credentials that must differ between development, staging, and production.
Environment variables separate configuration from application code, but they are not automatically secure. Sensitive values still require restricted access, careful logging, rotation, and a hosting design that prevents them from being exposed to browsers or unauthorized processes.
ELI5
An environment variable is a named setting given to a program from outside its source code when the program runs. It lets development, testing and production use different endpoints, feature settings or credential references without rewriting the application.
For example, the same app can receive one database address on a laptop and another on its production server. Secret values still need protected storage and careful logging because putting a password in an environment variable does not automatically make it safe.
