How to find mongo data through express route and print the data into jade template
<p>How to find mongo <code>data(db.collection_name.find())</code> through express route and print the data into jade template.</p>

<p>Here is my express route( I am using express2.5.8)</p>

<pre><code>    app.get('/showData',function(req,res){
  db.collection('comments',function(err, data){
    if(err){
      throw err;
    }
    else{
      data.find();
      res.render('help', {data: data});
    }
  });
});
</code></pre>

<p>It through an error that <code>db.collection</code> is not a function</p>