← Back to Blog
Hosting & Deployment2 min read

How to Put a Real Web App Online When You've Only Ever Run It Locally

A web app can work perfectly on localhost and still be nowhere near ready for another person to use.

Locally, a lot of things are conveniently invisible. The frontend knows where the backend is because both are running on my machine. Environment variables exist in my local files. The database may accept connections from me without any additional configuration. There is no real domain, HTTPS is someone else’s problem and restarting the development server fixes half the issues.

Deployment forces all of those assumptions into the open.

For me, it helps to stop thinking about “deploying the app” as one action. There are usually several pieces:

frontend
backend / functions
database
environment variables
domain
authentication configuration

Each one has to know how to reach the others in production.

One of the most common mistakes is leaving development addresses somewhere in the project. localhost makes sense on my computer; it means nothing useful to a user visiting the deployed site.

Secrets and configuration also have to move out of local .env files and into the hosting platform’s environment configuration.

Authentication providers may need the production domain added to their allowed redirects. The database may need production credentials. Backend functions need to be deployed somewhere reachable from the frontend.

None of this requires maintaining a traditional server anymore. Services such as Vercel, Firebase and managed databases can handle most of the infrastructure.

The main difference between local development and production is therefore not that the code suddenly becomes more complicated. It is that all the connections that were implicit on my laptop now have to become explicit.

Topics

web deploymentproductionhosting