title: Mongoose and Mongo error, mongoose.connection.host returns null
body: <p>So I been debugging this weird error in which saving and findone does not work, overtime I suspect the connection is not right so I did a print out</p>
  
  <pre><code>console.log(mongoose.connection.host);
  console.log(mongoose.connection.port);
  </code></pre>
  
  <p>In which both returns null</p>
  
  <p>This is especially confusing when</p>
  
  <pre><code>var mongoose = require('mongoose'),
      connStr = 'mongodb://localhost:27017/task_test2';
  
  mongoose.createConnection(connStr, function(err){
      if (err) throw err;
      console.log ('Successfully connected to MongoDB');
      console.log(mongoose.connection.host);
      console.log(mongoose.connection.port);
  });
  </code></pre>
  
  <p>There are no errors throwed?</p>
  
  <p>Why is this happening, and how would I fix it? </p>
  
  <p>Thanks</p>