Closed xcg340122 closed 1 year ago
I want to change the query process to a synchronous operation.. Something like this:let arr = await worlds.find(function(err, results) { return results; });
let arr = await worlds.find(function(err, results) { return results; });
Hey, you can do this:
const arr = await worlds.findAsync();
All callback methods have an *Async counterpart.
*Async
See the Promises section of the readme.
To understand the,thank you
I want to change the query process to a synchronous operation.. Something like this:
let arr = await worlds.find(function(err, results) { return results; });