Skip to content

How would you do to connect to multiple Mongoose URI #538

@llccrr

Description

@llccrr

Hello,
I love the way you are declaring the mongo connection inside a loader, well injected.
However I was wondering how you would do if you wanted to instantiate two different connections ?
Usually, the right way of declaring two connection would be :

const conn1 = mongoose.createConnection(uri1);
const conn2 = mongoose.createConnection(uri2);

Then import these connections directly from the model files, do you know anyway of doing that while keeping the pattern you are using in this boilerplate ?

Thanks for the boilerplate,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions