I'm having issues updating a doc through Node + Express and Mongodb via Mongoskin. I used the following via the mongo command line and it works as expected:
db.userlist.update({_id: ObjectId('5377821219f21e974150bacf')}, {$set: {username: "Test"}})
However doing the similar line within Node doesn't work, and seems to return a 500 error via browser.
db.collection('userlist').update({_id: ObjectId('5377821219f21e974150bacf')}, {$set: {username: "Test"}});
I've tried passing the options multi: true and false and also tried adding a callback, but every time it doesn't work.
What am I missing? p.s. I'm very new to node and mongodb, thanks in advance.