Mongoose()

Parameters

Mongoose constructor.

The exports object of the mongoose module is an instance of this class. Most apps will only use this one instance.

Example:

  1. const mongoose = require('mongoose');
  2. mongoose instanceof mongoose.Mongoose; // true
  3. // Create a new Mongoose instance with its own `connect()`, `set()`, `model()`, etc.
  4. const m = new mongoose.Mongoose();