📅  最后修改于: 2022-03-11 15:03:20.942000             🧑  作者: Mango
router.get('/list', (req, res) => {
Employee.find((err, docs) => {
if (!err) {
res.render("employee/list", {
list: docs,
});
}
else {
console.log('Error in retrieving employee list :' + err);
}
})**.lean()**; // It is prevent the warning when trying to display records