Rullst AcademyRullst Academy/Lesson
My first quiz with Rullst · Lesson 04 / 08

A door to your game

A house can have doors. A web app also has paths that lead to pages.

Learning paths5 min

Let's discover together

  1. 1

    On the web, an address leads somewhere. The /jogar part is the path to the game page.

  2. 2

    A route connects a path to a server action. The server is the program that receives the request and sends the response.

  3. 3

    In Rullst, get("/jogar" => quiz) means: when someone requests /jogar, run quiz to respond.

✦
YOUR MISSION

Choose the /jogar path to open the quiz in our little browser.

Now it's your turn

meu-quiz.local/

You're on the home page. Where could the game be?

A moment to understand

What is a route for?

I need a hint

The path name starts with a slash: /jogar.

Loading your journey…

Take it with you

What path would you choose for a help page? /help is one clear possibility.

Show me the Rust behind it

This part is optional. You don't need to memorize the code to continue.

let app = routes![
    get("/" => home),
    get("/jogar" => quiz)
];
At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.