// Learn

What is deployment?

Deployment is the process of taking your code and making it available on the internet.

The short version

You've built something on your laptop. It works locally. Now you want other people to use it. Deployment is the step between "it works on my machine" and "it works for everyone." It involves putting your code on a server, configuring it, and making it accessible via a URL.

Modern platforms like Vercel, Railway, and Netlify have made this dramatically simpler than it used to be. In many cases, you connect your GitHub repo and every push to the main branch automatically deploys.

How it works

A typical deployment flow:

  1. You push code to GitHub (or merge a pull request into the main branch).
  2. The hosting platform detects the change. If you've connected your repo to Vercel or Railway, it watches for new commits.
  3. A build runs. The platform installs dependencies, compiles your code, and creates the production version. This is where errors surface if something is misconfigured.
  4. The build is deployed. The compiled output is placed on servers (or serverless functions) and assigned a URL.
  5. DNS routes traffic. Your custom domain points to the hosting platform, and users hit the live site.

Things that commonly go wrong at this stage:

  • Missing environment variables. The app expects a database URL or API key that exists locally but hasn't been set in the hosting platform.
  • Build errors. Code that works in development might fail in production because of stricter compilation settings.
  • Preview deployments. Most platforms create a temporary URL for every pull request so you can test before merging. These are called preview or staging deployments.

Why it matters

Deployment used to require sysadmin knowledge: SSH access, server configuration, Linux commands. Now it's often just a Git push. But understanding what's happening behind the one-click deploy means you can fix things when they break, and they will break eventually.

=++==+==++=