Cara Menginstal Ekspressang Express Coding
$ npm install express-handlebars
Shiny Shark
$ npm install express-handlebars
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