Level 7 Challenge: Build a Node.js Server With 3 Routes
You’ve spent all of Level 7 learning pieces: running a server, adding routes, serving JSON, serving HTML, and stopping and restarting. Each one made sense on its own. But here’s the question that decides whether it stuck: can you join them into one real thing?
The Level 7 challenge is to build a Node.js server in one file that answers three routes — a home page, a /menu route that returns JSON, and an /about route that returns an HTML page — all running together from server.js.
Think of it like opening your own food stall. Until now you practised chopping, plating, and billing separately. Today you run the whole stall at once. This is no longer a demo. It is your first real backend.
What does the Level 7 challenge actually ask for?
When you build a Node.js server for this challenge, you wire together everything from the level into a single program. The shape is simple, and you already know every piece:
/— a home page that greets the visitor./menu— serves JSON, the format your data travels in./about— serves an HTML page, the kind a browser shows.
All three live in one server.js file. The win isn’t any single route. It’s that one running server now decides what to send back depending on which address the visitor asks for. That decision-making is exactly what real backends do every day.
Why does joining the pieces matter?
Learning each command on its own is easy to forget. Wiring them into one server is what makes the knowledge stick, because every part finally has a job. The home page proves your routing works. The /menu route proves you can hand back structured data. The /about route proves you can serve a real page.
Most importantly, the same idea — one server, many routes, different responses — is how WhatsApp, Flipkart, and your bank’s UPI app are built underneath. They just have thousands of routes instead of three. Once you build a Node.js server with three routes, the jump to bigger apps is only more of the same.
How do I try it right now?
Open your project folder, create or edit server.js, and write all three routes inside one server. Then run it:
node server.js
With the server running, visit each address in your browser and check the response:
http://localhost:3000/— your home page text.http://localhost:3000/menu— JSON data, shown as plain text by the browser.http://localhost:3000/about— a proper HTML page.
If all three respond correctly, you’re done. If one breaks, read the error in your terminal — it usually tells you exactly which route or line needs a fix. Stop the server with Ctrl + C, edit, and run it again. That stop-edit-restart loop is the everyday rhythm of building backends.
What comes after the Level 7 challenge?
Finishing this means Level 7 is done. You can now build a Node.js server, route requests, and serve both data and pages — the core of every web backend. Next up in the free Zero to AI Hero course is Level 8, where you meet Claude Code and start building apps by describing them in plain language. You’ll be glad you understand servers first, because now you’ll actually know what Claude is writing for you.
Key takeaways
- The Level 7 challenge is to build a Node.js server in one
server.jsfile with three routes. /serves a home page,/menuserves JSON, and/aboutserves an HTML page.- Run it with
node server.jsand visit each route onlocalhostto test. - One server returning different responses per route is the foundation of every real backend.
- Next stop: Level 8 and Claude Code in the free Zero to AI Hero course.
🚀 Take the full free course: Zero to AI Hero — learn to build with AI from scratch. New lessons daily, in Hindi & English.
Want to actually learn this?
151 free 2-minute lessons — from "what's a file?" to building with AI.
▶ Start the free course