I want to call two mongoose queries "Parallel" and pass the returned data of both the queries to client side.
//both queries should be called parallel, not one after another
//query 1
PaperModel.find().then((papers) => {
});
//query 2
ConferenceModel.find().then((conferences) => {
});
//this function should only be called when both the
//queries have returned the data
res.render('Home', {
Papers: papers
Conferences: conferences
});
I tried to look at this but didn't get it well. Thanks