cls-middleware icon indicating copy to clipboard operation
cls-middleware copied to clipboard

made example in readme runnable

Open gabrielf opened this issue 12 years ago • 0 comments

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.

gabrielf avatar Mar 22 '14 10:03 gabrielf