title: How Can I Render The Contents Of My Database Using Mongoose?
body: <p>I'm trying to render the components of my mongo database. I've tried res.send and it's working, but when I try to res.render it into the index.ejs file, it doesn't work. Console.logging is working but rendering isn't working. I think I'm missing something.</p>
  
  <p>I've tried res.send(posts). Found posts already by sending a get request and defined like this in rendering res.render('index.ejs', {posts: foundPosts})
  res.send(posts) is working and showing me my posts, but ejs is not working.
  My EJS Code<br>
  Removed brackets due to problem in Stack Overflow. But these are present in original coding.</p>
  
  <pre><code>app.get('/', function(req, res){
  post.find({}, function(err, posts){
      if(err){
          console.log(err);
      } else {
          res.render('index', {posts: posts});
      }
  });
  });
  &lt;h1&gt;&lt;%= posts.title %&gt;&lt;/h1&gt;
   &lt;img src="&lt;%= posts.url %&gt;" alt=""&gt;
  </code></pre>
  
  <p>I expected to be all posts there, but it's showing a blank page.</p>