Remember that form with no recipient?
In Level 2, you built a form that checked a message, said thanks… and then threw the message away. There was nowhere to save it. Your website, so far, can only hand out ready-made files: it can’t receive and remember anything. For that, you need a server. And that’s exactly what you’re about to learn to build.
Frontend and backend
Every big application (Instagram, an online school, an online shop) has two halves:
- Frontend: whatever runs in the visitor’s browser. HTML, CSS, JavaScript, React. You already know all of this!
- Backend: a program running on a server. It receives requests, saves data, enforces rules. And because Node.js exists, it can be written in a language you already know: JavaScript.
How do the two halves talk to each other? Through an API (Application Programming Interface): agreed-upon addresses where the backend responds. Here’s a sample conversation:
Frontend: GET /api/messages ("Send me all the messages.")
Backend: [{ "name": "Grandma", "text": "Lovely website!" }]
Frontend: POST /api/messages ("Here's data, save it: ...")
Backend: { "saved": true }
- GET = “give me data” (your browser does this every time you open a page).
- POST = “here’s data, save it” (that’s what your form does).
Data is sent in the JSON format: it looks almost exactly like the JavaScript objects you know from the quiz. A lucky coincidence? No. JSON stands for JavaScript Object Notation. It’s on your side.
Where does a backend like that run?
While developing, on your own computer (localhost, you know it from Vite). In production, on a computer that’s always on and connected: either a rented “slice” of a server (a VPS), or a service that handles everything for you (Render, Railway…). We’ll get to deployment in the final lesson.
So what was GitHub Pages for, then? That’s hosting just for the frontend: it hands out files, nothing more. Perfect for a Level 1–2 website (and also the safest: where nothing is running, nothing can be hacked). You need a backend the moment your website has to receive and remember something: messages, sign-ups, users.
Your turn 💪 (a mini-mission out of curiosity)
- Open your favorite website, press F12, and switch to the Network tab. Reload the page and watch the waterfall of requests: every line is one conversation between the browser and a server.
- Find a
GETrequest in the list, and one that returns JSON (Type column:jsonorfetch). Click it and look at the response: you’ll see the data the page is built from. - Type this into the console and watch the frontend ask for data on its own:
fetch("https://api.chucknorris.io/jokes/random")
.then((response) => response.json())
.then((data) => console.log(data.value));
fetch(...) is the JavaScript command “call an API.” In lesson 9, you’ll use this exact command to connect a form to your own server.
Check yourself: You can explain in your own words the difference between frontend and backend, you know what GET, POST, and JSON are, and you’ve seen in the Network panel how websites talk to each other. In the next lesson, you’ll build a server like this yourself.
What to take away from this lesson
- The frontend runs on the visitor’s device, the backend runs on a server; they talk through an API using GET (give) and POST (save) messages.
- Data flows in the JSON format: it looks like JavaScript objects.
fetch()is how a frontend asks a server for data.
© 2026 Ing. Martin Polak / AlgoRhino · Content usage terms