cls-middleware
Connect & Restify middleware to bind routes to continuation-local storage
Last updated 7 years ago by othiym23 .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cls-middleware 
SYNC missed versions from official npm registry.

Connect / Restify middleware for CLS

Dirt-simple middleware for Connect and Restify handlers into a continuation-local storage context.

Example:

var cls     = require('continuation-local-storage');
var express = require('express');
var clsify  = require('cls-middleware');

var ns = cls.createNamespace('namespace');

var app = express();
app.use(clsify(ns));

app.get('/users', function (req, res, next) {
  // clse.getNamespace('namespace').get('whatever') will work here now.
});

Current Tags

  • 1.1.0                                ...           latest (7 years ago)

3 Versions

  • 1.1.0                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 2
Last Month 4
Dependencies (1)
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |