Games Node.js Request Relay

Request Relay

Request handlers, bodies, headers, middleware, next() and errors.

0 / 7 levels · 0 / 21 ★Start playing ›
  1. Request Relay

    A request is a baton in a relay race. Each middleware runner passes it on with next() or finishes the race with res.end(). If nobody finishes, the client waits forever. The body arrives in boxes, and the headers are the envelope: once it is sent, you cannot change the address.

Your rulebook

Finish a level to add its rule. Fill the book and you can explain all of this in an interview.

  1. 1Finish One handler run per request to unlock this rule.
  2. 2Finish The body comes in boxes to unlock this rule.
  3. 3Finish Headers go first to unlock this rule.
  4. 4Finish Pass the baton with next() to unlock this rule.
  5. 5Finish The dropped baton to unlock this rule.
  6. 6Finish A throw nobody catches to unlock this rule.
  7. 7Finish Catch it and send a 500 to unlock this rule.