Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutiple Databases #2

Open
johntom opened this issue Apr 15, 2019 · 1 comment
Open

Mutiple Databases #2

johntom opened this issue Apr 15, 2019 · 1 comment

Comments

@johntom
Copy link

johntom commented Apr 15, 2019

I need to convert a repo that uses 2 mongodb databases and 1 mySql database. How to accomplist the first goal of attaching to the mondodb databases and assinging the models?

@Eomm
Copy link

Eomm commented Jun 25, 2020

I did some analysis for this here: https://stackoverflow.com/a/62571109/3309466

It is doable using const conn = mongoose.createConnection( instead of connect here:

await mongoose.connect(uri, settings);

Using a connection singleton break the encapsulation of fastify so it would be a simple but huge improvements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants