Skip to content

Add 'createConnection' event to Mongoose global #9985

@vkarpov15

Description

@vkarpov15

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Right now there's no way to watch Mongoose for newly created connections

What is the expected behavior?

mongoose.on('createConnection', conn => console.log(conn.id)); // 1

What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.

Mongoose 5.11.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureThis change adds new functionality, like a new method or class

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions