Javascript – How to use export insde a function with ES6?
I want to export the client.db() after the connection but the problem is that the default export must be at the top level of a file or module declaration. this is my code. import { MongoClient } from "mongodb"; import…