0.0.8 • Published 3 years ago

cls-mongoose-shim v0.0.8

Weekly downloads
171
License
ISC
Repository
github
Last release
3 years ago

CLS shimmer for Mongoose

Adds CLS wrapper for Mongoose, making mongoose safe to use with continuation-local-storage.

This is a fork of iliakan/cls-mongoose and feedhenry/cls-mongoose compatible with mongose >= 4.5.0.

I will try to maintain with new mongoose versions. If a new version is out and not supported please open an issue or submit a pull request.

Usage:

var cls = require('continuation-local-storage');
var clsMongoose = require('fh-cls-mongoose');

// or cls.getNamespace if exists
var clsns = cls.createNamespace('app');

var mongoose = require('mongoose');
clsMongoose(clsns);

After mongoose is patched, use it as usual.

0.0.8

3 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago