@turivishal thanks again !!! This works. I was earlier tried to do something like this
async function firstInsert() {
my_db = firstConn.useDb(firstDB.db)
console.log(my_db.listCollections())
let doc = await FirstSchema.find();
//console.log(doc);
return doc
}
… but it wouldn’t work and I get error “UnhandledPromiseRejectionWarning: TypeError: my_db.listCollections is not a function”. I thought it’s enought to be connected to DB. It appears we need to wait for “open” event too. I am trying to look it up online.