Browse Source

merge from chriskv-master

Patrick Falls 12 years ago
parent
commit
b2e7acca9a
2 changed files with 3 additions and 5 deletions
  1. 2 4
      nodejs/hello.js
  2. 1 1
      nodejs/package.json

+ 2 - 4
nodejs/hello.js

@@ -54,11 +54,9 @@ function mongooseQuery(callback) {
 }
 }
 
 
 function mongodbDriverQuery(callback) {
 function mongodbDriverQuery(callback) {
-  process.nextTick(function() {
-  collection.find({ id: getRandomNumber()}).toArray(function(err, world) {
-    callback(err, world[0]);
+  collection.findOne({ id: getRandomNumber()}, function(err, world) {
+    callback(err, world);
   });
   });
-  })
 }
 }
 
 
 function sequelizeQuery(callback) {
 function sequelizeQuery(callback) {

+ 1 - 1
nodejs/package.json

@@ -5,9 +5,9 @@
   , "dependencies": {
   , "dependencies": {
       "mongoose": "3.5.5" 
       "mongoose": "3.5.5" 
     , "async": "0.2.5"
     , "async": "0.2.5"
-    , "mongodb": "1.2.14"
     , "mysql-libmysqlclient": "1.5.2"
     , "mysql-libmysqlclient": "1.5.2"
     , "mapper": "0.2.4-pre"
     , "mapper": "0.2.4-pre"
+    , "mongodb": "1.3.0"
   }
   }
   , "main": "hello.js"
   , "main": "hello.js"
 }
 }