falseis returned, no further routes will be executed. If
trueis returned, route evaluation will continue. (more on request handler return values here).
returnstatement when you are returning
chainmethod, or assign middleware in the
middlewareparameter of a route method.
app.chain, or `middleware. Self-explanatory.
middleware: ...directly, as it is used internally
handleRequest(RequestContext, ResponseContext)method. This pattern is seen throughout many Angel plugins, such as
handleRequestmakes it very clear to anyone reading the code what it is supposed to do. This is the same rationale behind controllers providing a
chaincalls, assigned to variables, which have the added benefit of communicating what each set of middleware does: