Docs
Concepts
Pipeline

Pipeline

A pipeline (or execution pipeline) is an array of middlewares where the very last element must be a handler.

type Pipeline = [...Middleware[], Handler]

Why? Writing middleware application over a handler as an array is more readable than using the regular function application i.e.

// less readable
middleware1(middleware2(middleware3(handler0)))
 
// more readable
[middleware1, middleware2, middleware3, handler0]