mongoose-multitenancy
The best of both worlds Mongoose.discriminator & mongoose-multitenant This package uses the mongoose discriminator functionality to extend schemas and uses the logic of mongoose-multitenant to create the models. Right now multitenancy just works with collections.
Installation
npm install mongoose-multitenancy
@NOTE: It requires mongoose as peerDependency.
Usage
var mongoose = ; // It automatically adds logic to mongoose. var multitenancy = ; multitenancy; var LogSchema = entry: type: String required: true user: type: username: type: String required: true ; mongoose;
Tests
npm test