Why Web Apps Use Environment Variables

DATABASE_URL=postgres://prod-server/mydb: with just this one line, your app connects to the production server. Use a local DB in development, a test DB in staging, and the real one in production. All without changing a single line of code.
Never write passwords or API keys in your code. Change settings per environment. This is one of the core principles of "The Twelve-Factor App," a methodology for modern application development. Environment variables are at its heart.
Knowing export and .zshrc will come in handy when configuring web apps and servers. Environment variables are the bridge between the terminal and application development.
