Thursday, 11 May 2017

Express with mongodb find one

Im new to nodejs , express and mongodb. I got stuck at the findOne function using ObjectId of mongodb

With the code below, I got the error : "Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters" Im using lastest version of everything (because Im new to them)

enter image description here

Please tell me what's wrong with my code . p/s : the req.params.id is valid and logable.



via Duong Bach

No comments:

Post a Comment