othiym23/cls-middleware — pull request #6 by gabrielf (2014-03-22 10:02:25+00:00)
Title: made example in readme runnable

The most important fix was getNameSpace => getNamespace but also the removal of the superfluous "next()" in the route (necessary for restify but makes express crash with "Error: Can't set headers after they are sent".

The example also crashed on the ns.set with "Error: No context available. ns.run() or ns.bind() must be called first." so I introduced a naive requestId middleware to set something in the request call chain.