Urgent.News

What's breaking now, across thousands of outlets.

Tech

Designing Application Configuration Across Environments

Most applications begin on a developer's machine. You build the application, run the services it depends on, connect it to a database, and get everything working locally. Then the application has to run somewhere else. It might move to another developer's system, a staging server, or production. Ideally, the same application build should be able to run in each place. What changes is the system…

Application configuration moves between development, staging, and production environments. Developers run the application locally, then move it to staging servers or production. Each environment requires different settings like database connections and service addresses. The code should not change for each environment. Instead, the application should know what it needs, and the surrounding environment should provide the specific settings.

Environment variables exist for this purpose. Systems provide environment variables to processes. On a developer's machine, the developer sets environment variables like DATABASE_URL. During development, a .env file can store these values, but it is not the configuration system itself. The application reads environment variables without knowing their source.

Deployment platforms also support environment variables, and containers receive configuration at start-up. Sensitive values like passwords should be stored in a secret-management system. The important thing is that the application asks for configuration values, and the environment supplies them appropriately.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Storing Customer VAT IDs in PostgreSQL

Originally published at vatnode.dev . The version on vatnode.dev is the canonical source — refer to it for the latest content.

  • Store current VAT ID in mutable column for latest value
  • Log historical validation checks in append-only log
  • Normalize VAT IDs by uppercasing, stripping whitespace

React useScrollLock Hook: Lock Body Scroll for Modals (2026)

Your modal is open, centered, perfect. Then someone flicks the overlay and the page behind it scrolls away underneath. Everyone's first fix is the same three lines: useEffect (() => { document .

  • Prevents page scrolling when modal is open
  • Use useEffect to control overflow property
  • @reactuses/core's useScrollLock hook addresses issues

More from Wednesday 19 August →