Build the mental model
Once you know your app needs to be deployed, the next question is where. Hosting is a spectrum of categories that trade convenience for control.
- Static / Managed platforms (Netlify, Vercel, GitHub Pages) -- handle almost everything, little control
- Serverless (AWS Lambda, Google Cloud Functions) -- no server to manage, pay only for usage
- Containers (AWS ECS, Google Cloud Run) -- run consistently anywhere, more runtime control
- VPS (virtual private server) -- full OS access, maximum control, maximum responsibility
- Shared hosting -- many customers on one server, cheap, limited control
None of these categories is universally best. A tiny personal blog and a large multi-service backend have completely different needs, and later lessons and projects in this course will teach how to choose between them.
HOSTING CATEGORIES: MANAGED VS CONTROL
--------------------------------------
MOST MANAGED MOST CONTROL
LEAST CONTROL <-----------------------------> LEAST MANAGED
Static/Managed Serverless Containers VPS (full OS)
(Netlify, Vercel, (Lambda, (ECS, Cloud (EC2, Droplet)
GitHub Pages) Functions) Run)Connect it to a real scenario
The recommendHosting function below is a toy decision-maker, not a rule you should follow blindly in real life, but it captures the spirit of choosing a hosting category. It takes three simple yes-or-no facts about a project, whether it has backend code at all, whether it needs full control over the operating system, and whether the team wants minimal ongoing operations work, and returns one recommended category. A project with no backend at all, like a portfolio site, gets static hosting, since there is no server-side code to run.
A project that explicitly needs full operating system control, like a custom game server, gets a VPS. Everything else that wants minimal ops work gets serverless, otherwise it falls back to container hosting.
Running it against three example projects shows three different, reasonable-looking answers. Remember this is intentionally oversimplified: real decisions also weigh cost, team experience, expected traffic, and how the project might grow, which is exactly what later, more advanced material on this site is for.
Hosting Category Cheat-Check
Try the working example
function recommendHosting({ hasBackend, needsFullControl, wantsMinimalOps }) {
if (!hasBackend) return "static hosting";
if (needsFullControl) return "VPS";
if (wantsMinimalOps) return "serverless";
return "container hosting";
}
const projects = [
{ name: "Portfolio site", hasBackend: false, needsFullControl: false, wantsMinimalOps: true },
{ name: "Custom game server", hasBackend: true, needsFullControl: true, wantsMinimalOps: false },
{ name: "Small API backend", hasBackend: true, needsFullControl: false, wantsMinimalOps: true }
];
for (const p of projects) {
const { name, ...needs } = p;
console.log(`${name} -> ${recommendHosting(needs)}`);
}Portfolio site -> static hosting
Custom game server -> VPS
Small API backend -> serverless5-minute try-it
Add a new project to the projects array with hasBackend: true, needsFullControl: false, wantsMinimalOps: false, and confirm recommendHosting() falls back to returning "container hosting".
One important caution
Assuming one hosting category is universally best for every project
Deciding based only on technical fit, while ignoring cost, team experience, and how the project might grow
Wikipedia: Web hosting service — Cloud & Deployment