Unit I · How your app runs
Your laptop is not production
The same code behaves differently on your laptop, on a test copy and on the live site, because the settings, the data and the traffic differ. Keeping them apart on purpose avoids the worst surprises.
Three common environments
Development is the copy on your own machine, where breaking things is cheap. Staging (sometimes called preview) is a private copy of the live setup, used to try a change before real users see it. Production is the live site, with real users and real data.
Same code, different settings
The Twelve-Factor App guidelines describe keeping configuration (database addresses, keys, feature switches) strictly separate from the code, so one build can run in every environment with different settings. They also recommend keeping development and production as similar as possible, so a change that works in one works in the other.
Habits that save you
Try changes away from production first. Never copy real customers' data onto your laptop to test with. Write down how to start the app from scratch: if only the AI chat knows how your app runs, you do not know how it runs.
Words to know
- Development
- your own working copy
- Staging
- a private rehearsal copy of the live setup
- Production
- the live site real people use
- Configuration
- settings that change between environments
Sources
Checked October 17, 2026. Pages on other sites change; if a source no longer says what the lesson says, the source wins.