Glossary

Environment Variables (.env)

Environment variables are configuration kept outside the code: passwords, API keys, database URLs. They are stored in the OS environment or in a .env file. Code reads them at runtime instead of hardcoding values in source.

Why separate from code

Best practice

Keep a .env.example in the repository with all keys but no values — new developers will know what to configure. In CI/CD, inject variables via the provider's UI, not via files.

12-Factor App

Storing configuration in environment variables is one principle of the 12-Factor App methodology — a set of practices for building scalable cloud applications.