fh-cls-mongoose

    2.1.1 • Public • Published

    CLS shimmer for Mongoose

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

    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.

    Keywords

    Install

    npm i fh-cls-mongoose

    DownloadsWeekly Downloads

    15

    Version

    2.1.1

    License

    ISC

    Last publish

    Collaborators

    • davidffrench
    • feedhenry