Hello,
Thank you for your reply.
The thing is I’m using mongoose in other places in the app, notably when defining models. So I’m not sure if I should replace the mongoose driver with the native mongodb driver.
Or maybe I should use your same approach of using globalThis but with mongoose?
I’ll be trying this as I wait for your response 