0.0.8 • Published 2 years ago

cls-mongoose-shim v0.0.8

Weekly downloads
171
License
ISC
Repository
github
Last release
2 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

2 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago