The same app, different settings

An app may use one database address in testing and another in production. Other settings control how much activity it records, how long it waits for a response, or which outside service it uses. Together, these settings are its configuration. They can come from files, environment variables, or a central settings service.

The app reads these settings wherever it runs, whether on a developer’s computer or a server. This lets the same code work in different environments.

Putting a setting directly in the code instead is called hardcoding.

Why settings matter

A wrong setting can break an app even if its code is correct. Teams review important changes, check required settings when the app starts, and store sensitive values securely. A feature flag is a setting that controls whether a feature is available, sometimes while the app is running.