← Level 3 – Master

Lesson 10 of 10 ⏱ 45 minutes Premium

The grand finale: deploying to the internet

Get your whole app onto the internet, and look back on the journey from your first <h1> to here.

The last step of the journey

Your app runs on localhost, on your own computer. The Master’s final skill: getting it out to real addresses. The frontend and backend get deployed separately, exactly why we built them apart in the first place.

Deploying the frontend (React)

Vite can turn your app into finished files with one command:

npm run build

This creates a dist/ folder: plain HTML, CSS, and JavaScript. And you already know where to put it: it’s a static website, just like in Level 1!

Deploying the backend (Node.js)

A server needs a computer that stays on all the time. That’s what services like Render are for. Its free version is enough for a school project. Just know that when nobody visits your server for a while, it falls asleep, and the first visitor has to wait a moment for an answer:

  1. Upload the my-server folder to its own repository on GitHub (without node_modules: that gets installed on the server automatically).

  2. On render.com (with a parent), choose New → Web Service, connect the GitHub repository, and set: Build Command npm install, Start Command node server.js.

  3. Render will give you an address like https://my-server.onrender.com. Try .../api/messages in your browser: your API is live on the internet!

  4. One last detail: in the frontend, replace every http://localhost:3900 with the new server address, and deploy the frontend again.

⚠️

Before you let the guestbook out into the world, think like a guard: anyone on the internet can find it. Keep the message-length checks on the server (you have them from the last lesson!), never display messages as raw HTML (React protects you from this automatically: another reason to use it), and agree with a parent to check the book from time to time. Big websites have whole teams for this: it’s called moderation.

🏆 Congratulations, Master!

Take a moment to look back at where you started:

What you know now is the real foundation of the web developer’s craft. Not a toy version; the actual foundation. The same tools, the same processes, the same way of thinking as in real companies.

Where to go next?

A few directions that follow naturally from here:

✅

Check yourself (and farewell): Both the frontend and backend are running at public addresses, and the guestbook accepts messages from around the world. Send the address to your family, and don’t forget to tell them you built the whole thing with your own two hands. 🚀

What to take away from this lesson

🏆 Your diploma

Finale of Master

Once you check off every lesson, you can print a certificate.