monk Questions

17

Solved

I have a method to find a document in my database based on its ObjectID: console.log('id: ' + id + ' type: ' + typeof id); collection.findOne({'_id':new ObjectID(id)}, function(error,doc) { if ...
Vaporetto asked 5/5, 2015 at 11:5

3

Solved

I'm learning NodeJs. To connect to and use MongoDB from NodeJS, I see a lot of examples using either Monk or Mongoose. Are these two libraries equivalent ? Do they have the same features or do th...
Jameljamerson asked 12/5, 2014 at 17:36

3

Solved

I am very confused with the MongoDB behavior I am facing these days. I am running a MEAN(MongoDB, Express, Angular, NodeJS) application on a windows live server. Two times it happened that the whol...
Forthwith asked 11/1, 2017 at 9:39

1

I am using node js, and for the backend i am using mongodb For connecting to DB, if i use the below line, it is fetching data var db = monk('localhost:27017/nodetest2'); But if i change that to...
Pavla asked 28/7, 2015 at 5:50

2

Solved

I am using the below code to insert data to mongodb router.post('/NewStory', function (req, res) { var currentObject = { user: userId , story : story , _id:new ObjectID().toHexString() }; req.db...
Necrose asked 4/8, 2015 at 4:56

1

Solved

I want to retrieve data from MongoDB, 5 at a time I am using limit to limit the number of records returned router.post('/List', function (req, res) { var db = req.db; var collection = db.get('c...
Kohl asked 5/8, 2015 at 8:4

4

using mongodb3.0, node 0.12.0, npm 2.5.1 on windows 7 integrale, I am trying to read and write data into my database, but i have this error in npm intsall! { [Error: Cannot find module '../build/R...
Xanthe asked 24/3, 2015 at 16:49

1

Solved

I am working through a MEAN stack tutorial. It contains the following code as a route in index.js. The name of my Mongo collection is brandcollection. /* GET Brand Complaints page. */ router.g...
Mccahill asked 3/8, 2014 at 18:42
1

© 2022 - 2024 — McMap. All rights reserved.