title: How to pass data form mongodb (using Mongous module) into nodejs view (using temp engine jade)?
body: <p>Sorry to bother you folks. But i have a simple question. Ho can I pass data form model(database) into view. I use Express, Mongous(not Mongoose) to access MongoDB and Jade for my view-ing. I've tried Mongoose, but was not able to get even this far. The problem which I am having is how to actually pass data into view. Most examples that I've seen either have no mention of the views when database access is dicussed, or have manually created objects inside the views. I have not found any clear examples of data being fed into a view from the database. Please help, if you can...</p>
  
  <p>This is what my model looks like:</p>
  
  <pre><code>        //Model Mongo DB
      var mgs = require('mongous').Mongous,
          dbColl = 'test.personnel';
  
      mgs(dbColl).find(function(data){
          return data;
      });
  </code></pre>
  
  <p>I require it in my app.js like so:</p>
  
  <pre><code>        require(__dirname + '/model');
  </code></pre>
  
  <p>It seems to work because I do get connection messages and I can see my data in the terminal.
  Here is DB info.
  My DB name is "test", collection name "personnel" and here what my data looks like:</p>
  
  <pre><code>        {
         "_id": ObjectId("4ef82a27b238f02ed9000000"),
         "cms": {
           "0": "Druapl_1"
        },
         "first_name": "Name_1",
         "last_name": "Lst_Name_1",
         "skills": {
           "0": "html_1",
           "1": "css_1",
           "2": "jQuery_1"
        }
      }
  
      {
         "_id": ObjectId("4ef81a0dcf163c7da3e5c964"),
         "cms": {
           "0": "Druapl_2"
        },
         "first_name": "Name_2",
         "last_name": "Lst_Name_2",
         "skills": {
           "0": "html_2",
           "1": "css_2",
           "2": "jQuery_2"
        }
      }
  </code></pre>
  
  <p>Please help, if you do it will exponentially improve my understanding of how data is presented, not just in nodejs, but in general.Thanks.</p>