Is there a way for me use this code or a similar code to find by username instead of findById?
Router.route('/:id').get(function (req, res)
{
let id = req.params.id;
Books.findById(id, function (err, course) {
res.json(course);
});
});