title: MongoDB - Error: invalid schema, expected mongodb
body: <p>I'm new in building application with MEAN Stack, I'm trying to build a real time chat app, here is my server side :</p>
  
  <pre><code>console.log("Server running...!");
  
  var mongo=require('mongodb').MongoClient;
  var client=require('socket.io').listen(8080).sockets;
  
  mongo.connect('localhost:27017/db/chat',function(err,db){
  if(err)  throw err;
  
  client.on('connection',function(socket){
  console.log('someone has connected !');
  
  //waiting for input
  socket.on('input',function(data){
  console.log(data);
  });
  
  });
  
  });
  </code></pre>
  
  <p>I am sure that i created a data base called chat with mongodb, also mongo is waiting for connection. But when i run the server with node server.js an error occurs : </p>
  
  <pre><code>Server running...!
  C:\Users\azus\Desktop\Psirt\codemaster\node_modules\ mongodb\lib\url_parser.js:20
    throw new Error('invalid schema, expected mongodb');
    ^
  
  Error: invalid schema, expected mongodb
  at module.exports (C:\Users\azus\Desktop\Psirt\code-master\node_modules\mong
   odb\lib\url_parser.js:20:11)
  at connect (C:\Users\azus\Desktop\Psirt\code-master\node_modules\mongodb\lib
   \mongo_client.js:125:16)
  at Function.MongoClient.connect (C:\Users\azus\Desktop\Psirt\code-master\nod
  e_modules\mongodb\lib\mongo_client.js:109:3)
  at Object.&lt;anonymous&gt; (C:\Users\azus\Desktop\Psirt\code-master\server.js:6:8
  )
  at Module._compile (module.js:413:34)
  at Object.Module._extensions..js (module.js:422:10)
  at Module.load (module.js:357:32)
  at Function.Module._load (module.js:314:12)
  at Function.Module.runMain (module.js:447:10)
  at startup (node.js:139:18)
  
  C:\Users\azus\Desktop\Psirt\code-master&gt;
  </code></pre>
  
  <p>I had been blocked at this phase for weeks, could anyone help on this?</p>
  
  <p>Thanks.</p>