What is Configuration?

Avatar of Hemanta SundarayHemanta Sundaray

Configuration is data that an application reads from outside its source code to decide how it should run and what services it should connect to. It usually changes between different environments (development, staging, production).

Common examples include:

  • Resource handles: Database connection strings, Redis or Memcached addresses, and other backing services.

  • Credentials: API keys for external services such as Stripe, AWS, or Twilio, and passwords for internal databases.

  • Per-deploy values: The public hostname for the application (for example, api.myapp.com vs. localhost:3000) or the logging level (for example, DEBUG vs. ERROR).

  • Decoupling: You can change your configuration for different environments without changing a single line of code.

  • Security: Unlike configuration files, environment variables are less likely to be accidentally checked into a version control system like GitHub.

  • Language agnostic: Every operating system and programming language knows how to read environment variables. It’s a universal standard.

Sign in to save progress

Stay in the loop

Get notified when new Effect Foundation courses are released.