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 ...
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...
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...
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...
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...
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...
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.