Introduction
Environment-based configuration helps your Flask app use different settings for development, testing, and production without changing code.
You want to use a debug mode only when developing.
You need different database connections for testing and production.
You want to keep secret keys safe and not hard-code them.
You want to change app behavior based on where it runs (local or server).