Deployment
Getting an app from a laptop to a real address and keeping it there — hosting choices, domains, SSL, preview environments and zero-downtime releases.
84 posts · page 1 of 4
What Is Vercel? What It Does, What It Costs You, and When to Use Something Else
Vercel is a hosting platform built around frontend frameworks, especially Next.js: push to GitHub and your site is live. What it actually does, what serverless functions mean for your app, where the limits are, and when a regular server is a better fit.
What Is Nginx? The Web Server in Front of Half the Internet
Nginx ("engine-x") is a web server that serves files, forwards requests to your app, handles HTTPS and balances load. What it does, what a basic config looks like, where the files live, the commands you'll need, and whether you need it at all.
Vercel vs Netlify vs Cloudflare Pages: Which Should Host Your Site?
All three deploy your site from GitHub with a CDN, preview links and free SSL. The differences are in framework support, how backend code runs, and how billing behaves under load. A plain comparison, and when none of them is the right answer.
Deploy to a VPS With GitHub Actions: Push to Main, Ship to Production
Automate deploys to your own server: run tests in GitHub Actions, then SSH in and run your deploy script — or build a Docker image and pull it. Deploy keys, secrets, known_hosts, environments with approval, rollbacks, and keeping the SSH key's power limited.
Why Is My Environment Variable Undefined? (Vite, Next.js, Node)
Your .env file has the value but the code sees undefined. The reasons are almost always the same: the wrong prefix (VITE_, NEXT_PUBLIC_), the wrong file name or folder, not restarting the dev server, build-time vs runtime, or the variable never being set in production.
How to Deploy a Node.js App to a VPS, Step by Step
From an empty Ubuntu server to your Node.js app running on your own domain with HTTPS: create a user, install Node, clone and build, keep it running with PM2 or systemd, put Caddy or Nginx in front, and set up redeploys.
How to Deploy a FastAPI App to Production
Running uvicorn main:app --reload is for development. A production FastAPI deploy needs worker processes, a process manager or container, a reverse proxy with HTTPS, proper settings, migrations, and health checks. Step-by-step options for a VPS and Docker.
Cloudflare Proxied vs DNS Only: The Orange Cloud Explained
In Cloudflare's DNS settings, the orange cloud sends traffic through Cloudflare and the grey cloud doesn't. What changes with each, which records must be grey, the SSL modes that avoid redirect loops, and how proxying interacts with your host's automatic SSL.
502 Bad Gateway: What It Means and How to Fix It
A 502 means the server in front of your app (Nginx, Cloudflare, a load balancer) couldn't get a valid answer from your app. The usual causes — app crashed, wrong port, still starting, out of memory — and a step-by-step way to find which one.
500 Internal Server Error: How to Find What Actually Broke
A 500 error means your server-side code threw an error it didn't handle. The page tells you nothing on purpose; the real message is in your logs. Where to look, the most common causes in AI-built apps, and how to stop users seeing a bare 500.
www vs non-www: Which Should Your Website Use?
example.com or www.example.com? What the difference actually is, why it doesn't matter for SEO as long as you pick one, how to redirect the other, the DNS catch with root domains, and the cookie consideration that makes some teams choose www.
What Is a VPS? Virtual Private Servers Explained for Beginners
A VPS is your own slice of a physical server, with its own operating system and full control. What a VPS is, how it compares with shared hosting, PaaS and dedicated servers, what you're responsible for when you run one, and when a managed server is the better fit.
How to Turn Your Web App Into a Mobile App (Without Rebuilding It)
Three realistic paths from a web app to a phone app: make it a PWA, wrap it with Capacitor for the App Store and Google Play, or rebuild with React Native. Costs, what Apple rejects, what you need (yes, a Mac), and how to choose.
Subdomain vs Subdirectory: blog.example.com or example.com/blog?
Should your blog, docs or app live on a subdomain (app.example.com) or a subdirectory (example.com/app)? The technical differences, what it means for SEO, cookies and hosting, and sensible defaults for a small product.
Is SQLite Good Enough for Production? When It Works and When It Doesn't
SQLite now runs real production apps. When a single-file database is a great choice, the settings you must change (WAL mode, busy timeout, foreign keys), backups with Litestream, the single-writer limit, and the hosting setups where SQLite will lose your data.
HTTP Security Headers Explained: HSTS, CSP, and the Rest (With a Copy-Paste Setup)
A practical guide to the HTTP security headers worth setting: Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, frame protection, Referrer-Policy and Permissions-Policy — what each prevents, safe values, a Next.js and Nginx config, and which old headers to drop.
robots.txt and sitemap.xml Explained: A Beginner's Guide
Two small files that tell search engines (and AI crawlers) what to crawl and what exists on your site. How robots.txt and sitemap.xml work, examples, the robots.txt mistake that hides your whole site, why Disallow doesn't remove pages from Google, and how to generate both in Next.js.
How to Reduce Docker Image Size: From 1.5 GB to Under 200 MB
Big Docker images are slow to build, push, pull and deploy. The techniques that actually shrink them: slim base images, multi-stage builds, .dockerignore, production-only dependencies, layer ordering, cache cleanup — with Node.js and Python examples and a way to see what's taking space.
React App Shows a Blank Page After Deploying? Here's How to Fix It
Works locally, white screen in production. The usual causes of a blank page after deploying a React or Vite app — wrong base path, missing environment variables, a JavaScript crash, routing, caching — and how to diagnose each in two minutes with DevTools.
PM2 vs systemd: How to Keep a Node.js App Running on a Server
When you run node app.js over SSH and log out, your app dies. How PM2 and systemd keep it running, restart it after crashes and reboots, handle logs and environment variables — with working configs for both, and where Docker fits.
How to Optimize Images for the Web: Formats, Sizes, and Lazy Loading
Images are usually the heaviest part of a page. Which format to use (WebP vs AVIF vs JPEG vs PNG vs SVG), how big to make them, responsive images with srcset, lazy loading done right, and the one image you should never lazy-load.
"JavaScript Heap Out of Memory": Why It Happens and How to Fix It
FATAL ERROR: Reached heap limit — JavaScript heap out of memory. What Node's heap limit is, why builds and servers hit it, how to raise it safely with --max-old-space-size, when the real problem is a memory leak, and the difference from exit code 137.
Health Check Endpoints: What /health Should (and Shouldn't) Check
A health check endpoint tells load balancers, orchestrators and monitors whether your app can serve traffic. Liveness vs readiness, what to check and what not to, response formats, timeouts, security, and examples for Express, Next.js and Docker.
Graceful Shutdown in Node.js: Handling SIGTERM Without Dropping Requests
Every deploy and restart sends your Node.js app SIGTERM. How to shut down gracefully: stop accepting traffic, fail readiness, finish in-flight requests, close keep-alive connections, drain workers, close database pools — plus the Docker PID 1 and npm start signal traps.