I like to to go find a user in mongoDb by looking for a user called value. The problem with:
username: \'peter\'
is that i dont find it if
router.route('/product/name/:name') .get(function(req, res) { var regex = new RegExp(req.params.name, "i") , query = { description: regex }; Product.find(query, function(err, products) { if (err) { res.json(err); } res.json(products); }); });