You Built an App With AI. Now It Has to Run Somewhere
Your AI-generated app works on localhost:3000, but deploying it requires handling environment setups, security secrets, and hosting decisions.

Stock photo for illustration only, not from the actual event
- Building an app with AI differs fundamentally from deploying it to a production environment.
- Static front-end apps can be deployed instantly using free tiers on Vercel, Netlify, or Cloudflare Pages.
- AI-generated code often includes hardcoded secrets, local file dependencies, and dev-mode assumptions.
You described what you wanted, an assistant wrote it, and after some back and forth it works. You can see it at localhost:3000. It does the thing. Then you try to show someone, and there is nowhere to send them.
If you have spent the last few days getting increasingly frustrated at this stage, here is the useful thing to know first: you have not hit the limits of your ability. You have hit a different job. Writing the app is about behaviour, while deploying it involves everything the code assumes and never says out loud.

Stock photo for illustration only, not from the actual event
Before anything else, there is an honest fork in the road. If your app is a website with no backend, you do not need a server. Push it to GitHub, connect the repo to Cloudflare Pages, Netlify or Vercel, and it is online in about ten minutes on a free tier. If your app has a backend and a small database, start with Vercel, Railway, Render or Fly.
Understanding the gap between local development and cloud production environments is crucial for developers relying on AI assistants. Many deployment failures stem not from logical errors in the code, but from unconfigured environmental assumptions such as missing environment variables or ephemeral filesystems.
Whichever route you take, AI-written code tends to share a specific set of assumptions that stop being sensible once moved elsewhere:
- API keys and database passwords written directly into source files must be moved to environment variables.
- Filesystems on many hosting platforms are ephemeral; use a managed Postgres, MySQL, or object storage like Amazon S3.
- References to localhost must be updated for production environments.
- Development servers like npm run dev or flask run should be replaced with production-ready servers.
- Production needs process managers like systemd or Docker restart policies to handle reboots automatically.
"Before anything else, the honest fork in the road."
Dev.to
The most expensive oversight is often noticed last: taking a backup is easy, but verifying whether it actually restores data is what matters. Always restore your backup somewhere disposable to check that rows are actually in it.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment