Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 37 ยท Getting Started

Modern Web Hosting and the Jamstack

Learn what Vercel and Netlify actually do: build your site from Git, put the result on a global CDN, and run small functions on demand. Start here before your first deploy.

Years ago, putting a website online meant renting a server, installing software, copying files over FTP and hoping nothing broke at 3 a.m. Vercel and Netlify replace that with a simpler idea: you push code to Git, the platform builds it, and the finished files are copied to servers all around the world. There is no machine for you to patch or restart.

This tutorial teaches both platforms side by side. They share most concepts, so once you know one, the other takes an afternoon. In this first lesson you will learn the vocabulary and the mental model that every later lesson builds on.

Honesty note. Vercel and Netlify are hosted products, so they cannot run inside this site. Menus, commands and configuration files are described exactly, with read-only snippets. The runnable examples are small, clearly labelled stand-ins written in Node.js that model the same ideas: routing, build decisions, environment scoping and so on. We never show deploy output we have not seen.

The old way and the new way

With a traditional server (a VPS or shared hosting), one machine does everything: it stores your files, runs your code and answers every visitor. If a visitor is far away, the request travels far. If traffic spikes, the single machine struggles.

Modern platforms split the work into three parts:

  1. Build. A temporary computer in the cloud checks out your Git repository, installs dependencies and runs your build command (for example npm run build). The output is a folder of static files.
  2. Distribute. The files are uploaded to a CDN (content delivery network): many servers around the world that keep copies. A visitor in Tokyo gets files from a nearby server, not from your home region.
  3. Compute on demand. For the parts that need real logic (a contact form, a database query), the platform runs your code as functions that start when a request arrives and stop when it is done.

From push to page

Push You commit and push to Git.
Build The platform runs your build.
Distribute Files go to a global CDN.
Serve Visitors get files from nearby.

Functions handle the dynamic parts.

1 / 2

What is the Jamstack?

Jamstack (JavaScript, APIs, Markup) is the name for this style of site: pages are generated ahead of time, served as plain files, and made dynamic in the browser by JavaScript that calls APIs. The label matters less today because both platforms also host server-rendered frameworks, but the core habit remains: do as much work as possible at build time, and keep runtime work small.

Three terms you will see constantly:

  • Static site. Pages are ready-made HTML, CSS and JavaScript files. Fast, cheap and easy to cache.
  • SSR (server-side rendering). HTML is produced when a request arrives, by a function. Needed for per-user pages.
  • ISR / on-demand revalidation. Static pages that are refreshed in the background after a time limit or an event.

A tiny model of a CDN

The most important idea is caching: the first request for a file may travel to the origin, and later requests are answered from a nearby copy. This stand-in models a CDN with a few locations. It is a teaching model, not either platform's real code.

Node.js CDN cache model (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Notice that each location warms up on its own, so the origin sees three requests for six visits. Real platforms add many details (cache keys, expiry, purging), but the shape is the same, and you will tune it in the Performance and Limits chapter.

Static, dynamic and where code runs

Node.js Where does each request run? (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Why Vercel and Netlify specifically?

Both are popular, both have free tiers, and both connect to GitHub, GitLab and Bitbucket. Vercel is made by the creators of Next.js and shines with that framework. Netlify pioneered the Jamstack workflow and offers forms, identity and other bundled add-ons. The next lesson compares them in detail.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the build step on these platforms produce?

    The build runs your command and the resulting output folder, plus any functions, is what gets deployed.
  2. 2. Why is a CDN fast for visitors far from your origin?

    A CDN serves cached copies from a nearby location instead of making a long trip to the origin.
  3. 3. Which part of a site typically needs a function rather than a static file?

    Anything that needs logic at request time, such as sending an email or querying a database, runs as a function.
  4. 4. What is the Jamstack habit in one sentence?

    Pre-building pages and caching them is cheaper and faster than computing them for every visitor.

Summary

  • Vercel and Netlify build your Git repository, publish the output to a global CDN and run functions on demand.
  • You stop managing servers, certificates and scaling.
  • Static files are served from the CDN; dynamic logic runs in serverless functions.
  • Caching is the core performance idea: first request misses, later ones hit.
  • The runnable examples in this track are labelled stand-ins because the platforms cannot run here.

Next: Vercel and Netlify Compared