Topic 32
Configuration

Let all your things have their places; let each part of your business have its time.

Benjamin Franklin, Thirteen Virtues, autobiography

When code relies on values that may change after the application has gone live, keep those values external to the app. When your application will run in different environments, and potentially for different customers, keep the environment- and customer-specific values outside the app. In this way, you're parameterizing your application; the code adapts to the places it runs.

Tip 55Parameterize Your App Using External Configuration

Common things you will probably want to put in configuration data include:

  • Credentials for external services (database, third party APIs, and so on)
  • Logging levels ...

Get The Pragmatic Programmer: your journey to mastery, 20th Anniversary Edition, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.