Deployment Concepts
Deployment is the process of making your code run somewhere other than your computer — typically a server that's always online and accessible to others.
Understanding deployment concepts helps you ask the right questions. AI can handle the specifics once you know what you're trying to accomplish.
Types of Hosting
Static Hosting — For websites made of HTML, CSS, and JavaScript files only. The server just delivers files to browsers without running any code. This is the simplest and often free.
Server Hosting — For applications that run code on the server, like Flask or Express apps. The server executes your Python or Node.js code and sends results to users. More complex, but necessary for backends.
Database Hosting — For storing persistent data. Can be managed by your hosting platform (easiest) or run as a separate service. Your application connects to the database using a connection URL.
Environment Variables in Production
Your local .env file doesn't get deployed. Instead, hosting platforms provide ways to set environment variables through their dashboard or CLI.
This keeps secrets secure — they're stored on the platform, not in your code.
Choosing the Right Hosting
Ask yourself these questions:
Is it a static site (HTML/CSS/JS only)? Use GitHub Pages, Netlify, or Vercel. All offer free tiers and automatic deployment from Git.
Does it need a backend (Python/Node)? Use Railway, Render, or Fly.io. These platforms run your server code and often include database options.
Does it need a database? Most backend platforms offer managed databases. This is usually easier than running your own.
Do you expect heavy traffic? Start with free tiers. Upgrade when you actually need more capacity — premature optimization wastes time and money.
What Platforms Need From You
Most platforms require:
- Your code (usually connected via Git)
- A way to install dependencies (
requirements.txtorpackage.json) - A command to start your application
- Environment variables for configuration
The specifics vary by platform, but these fundamentals apply everywhere.
Start Simple
For your first deployments, choose platforms that minimize configuration. Connect your GitHub repo, set a few options, and let the platform handle the rest. You can learn more advanced deployment techniques as your needs grow.