Get more collection in mongodb output page home ?

github logo ・1 min read

function index(req , res , next){

db.collection("product").find({}).toArray(function(err , product){

db.collection("banner").find({}).toArray(function(err , banner){

db.collection("newest").find({}).toArray(function(err , newest){

  return res.render("/index" , {product : product ,banner : banner , newest : newest}); 
})

})
})

}

Please help me?

twitter logo DISCUSS
Classic DEV Post from Oct 4 '18

What is your best advice for a junior software developer?

What is your best advice for a junior software developer?

nguyennobita9999 profile image