infrastructure/from-localhost-to-production-what-deploying-your-code-really-means.md

From localhost to production: what “deploying” your code really means

Infrastructure · 10 min read ·

Your app runs perfectly at localhost:3000, but the link does nothing on a friend's phone. That's because localhost means "this computer", and only you are sitting at yours.

Deploying is how code moves from your laptop to a server the whole internet can reach. This guide covers development, staging and production environments, how environment variables let the same code use different settings (and why secrets never go in git), and the pipeline every deploy follows: push, build, test, run. Break a step yourself and watch the old version stay live.