visionmedia/express — pull request #1193 by karlseguin (2012-06-27 06:25:39+00:00)
Title: route middleware dependencies

Allows you to specify dependencies between route middleware, so that function X is always executed before function Y.

load_context = (req, res, next) ->
.....
next()

is_signed =
before: load_context
execute: (req, rex, next) ->
...
next()

specifying is_signed as a route middleware is now similar to [load_context, is_signed]..however, the dependency that is_signed has on load_context is cleanly part of the is_signed definition.