Lesson 7.5

The demo - auth, mounts, and the onion on a socket

Add middleware, the /admin short-circuit, and the /orgs/:org mount to the demo, then verify them over sockets and run stages 10 and 11.

20 minexamples/demo.js
  • Register the global order markers, default-user middleware, and prefix-gated authentication in the required order.
  • Mount a users router at /orgs/:org whose scoped middleware tags only its own paths.
  • Prove the onion order, the short-circuit, and mount scoping over sockets, then pass checks 10 and 11 and the full regression sweep.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth