After the connection to MongoDB, I need to export the client.db() but the default export must be at the top of a module declaration. How can I use export within this?
CalvinExplainer
How do you use export within a function in javascript ES6 in connection with MongoDB?
Share
You can use awaits followed by the export outside or without the function.