javascript - MongoDB findById not working -


i'm using monk , mongodb try , record id populate through request params returns nothing.

i've tried lots of suggestions on nothing working, have ideas i'm going wrong?

here code:

router.get('/:id', function(req, res) {   var db = req.db;   var collection = db.get('bugs');   collection.findbyid(req.params.id, {}, function(e,docs){       res.render('bug', { 'bug': docs });   }); }); 

and i'm trying access going localhost:3000/bugs/recordidstring

thanks

i being utter idiot , when connecting db connecting wrong one!

sorry guys, bad!


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -