tezvyn:

The Twelve-Factor App: Store Config in the Environment

Source: 12factor.netbeginner

Your app's code is the blueprint; its config is the specific address and utility hookups. Store config—database URLs, API keys—in environment variables, not in the code. The footgun is hardcoding secrets, making your code base impossible to open-source safely.

Your app's code is the blueprint; its config is the specific address and utility hookups for a given deployment. Store anything that varies between deploys—database handles, API keys, hostnames—in environment variables, completely separate from the codebase. A common footgun is using config files that can be accidentally committed or become scattered. The Twelve-Factor method uses environment variables as a language-agnostic standard, ensuring a strict separation of code and config.

Read the original → 12factor.net

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

The Twelve-Factor App: Store Config in the Environment · Tezvyn