I’m able to use the following code to retrieve a member from a database but it stops working when i change findOne() to find(). Why is that? How can I retrieve all items in db.collection(‘posts’)?
db.collection('posts').findOne({}).then(result =>{
console.log(result);
return result;
});