true
or false
. If false
is returned, no further routes will be executed. If true
is returned, route evaluation will continue. (more on request handler return values here).return
statement when you are returning true
.chain
method, or assign middleware in the middleware
parameter of a route method.chain
, app.chain
, or `middleware. Self-explanatory.app.chain([...])
when:chain
meta-handler.middleware: ...
directly, as it is used internally package:route
.app.fallback
. This is merely shorthand for calling app.all('*', <handler>)
. (more info on request lifecycle here).handleRequest(RequestContext, ResponseContext)
method. This pattern is seen throughout many Angel plugins, such as VirtualDirectory
or Proxy
.handleRequest
makes it very clear to anyone reading the code what it is supposed to do. This is the same rationale behind controllers providing a configureServer
method.chain
calls, assigned to variables, which have the added benefit of communicating what each set of middleware does: