title: Mongoose.js how to check if connection successful?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6676499/is-there-a-mongoose-connect-error-callback">is there a mongoose connect error callback</a>  </p>
  </blockquote>
  
  
  
  <p>I use mongoose.createConnection to create a connection, it works in async mode.</p>
  
  <p>How to check if connection was successful and how to get error if not?</p>
  
  <p>Thanks.</p>