A cartoon caveman

Create "Standardized" Middleware Stacks

(code for this section)

Middleware is code that wraps a handler function. This is usually done to either respond to the request before reading the wrapped handler or to parse information out of a request and make it available to that same handler.

This is all well and good, but if you start to have routes have their own bespoke stacks of middleware it can be a nightmare to debug and change later. Its especially onerous if you have to reason about "trees" of these middlewares

Therefore, I think it makes sense to take two pre-emptive steps

  1. Sequester "standard" middlewares into a dedicated namespace.
  2. Have each routes namespace pick their own middleware from those standard sets.

→ Process Form Submits.

← Display Forms.