Learning X
Sign inStart learning

Ask your agent for a course. Learn it here, one short visual lesson at a time.

Claude, Codex or ChatGPT writes the lessons: diagrams, code you step through, quizzes and flashcards. Learning X keeps your place on the course line and brings cards back the day before you’d forget them.

How a web request reaches the database

2 of 8

The trip · Lesson 3 of 8

One request, slowed down

Follow GET /orders/42 from the browser to Postgres and back.

7 min

Try it: the line fills to your next lesson.

Every lesson is something to look at and try

  • Code walkthroughs. Each line of code next to what it does, in plain words.
  • Diagrams and animations. Step through a system while the part being explained lights up.
  • Quizzes. Every answer, right or wrong, says why.
  • Flashcards. They join your reviews and come back on a schedule.
  • Predict, then reveal. Guess first; the answer sticks better.

From “How a web request reaches the database”

One request, slowed down

  1. export async function getOrder(req: Request) {

    A function the router calls for every request to /orders/:id.

  2. const id = Number(req.url.split("/").at(-1));

    Take the last part of the path, "42", and turn it into a number.

  3. const order = await db.query("select * from orders where id = $1", [id]);

    Borrow a pooled connection and send one SQL query. $1 keeps the id out of the SQL text.

  4. if (!order) return new Response(null, { status: 404 });

    No row came back: tell the browser the order does not exist.

  5. return Response.json(order);

    Turn the row into JSON and send it as the response body.

  6. }
Read the right column first, then the code.

Why does the server keep a pool of database connections?

Connect your agent once, then just ask

Add the Learning X server to Claude Code, Codex, Claude.ai or ChatGPT. The first time it calls, you sign in here and choose what it may do. Then ask for a course in plain words; the draft appears in your Studio, where you preview and publish it.

claude mcp add --transport http learning-x https://learningx.app/mcp
Use learning-x to build me a course on how Postgres indexes work, with a diagram in every lesson.

Progress you can see, reviews that come back on time

Mark a lesson done and the line fills to where you are. The dashboard opens on your next lesson, so a ten-minute session starts with reading, not searching.

  • How a web request reaches the database

    5 of 8
  • Postgres indexes from the ground up

    2 of 11
  • Reading TypeScript errors

    9 of 9

Review · sample

1 of 3

What does DNS do for a request?

Grade how well you remembered; hard cards come back sooner, easy ones wait longer.

Pick a topic you’ve been putting off.

Start learning