title: How to use two MongoDB collections in my Express router?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>router.get('/home', ensureAuthenticated, (req, res) =&gt; res.render('home', {user_mv: req.user, post_mv: req.post1}));
  
  //Create topic page
  router.get('/create-topic', ensureAuthenticated, (req, res) =&gt; res.render('create-topic', {user_mv: req.user}));
  
  
  //Post handle
  router.post('/create-topic', (req, res) =&gt; {
      const {user_id, title, category, vista, description} = req.body;
      let error2= [];
      if(!title || !category || !vista || !description) {
          error2.push({msg: 'Please check all fields.'});
      };
  
      if(error2.length &gt; 0){
          res.render('create-topic', {  
              error2,
              title,
              category,
              vista,
              description
          });
      }else {
          //Validation passed
          Post.findOne({title: title})
          .then(post1 =&gt; {
              if(post1){
                  //User exists
                  error2.push({msg: 'Title is already used.'});
                  res.render('create-topic', {
                      error2,
                      title,
                      category,
                      vista,
                      description
                  });
              } else {
                  const newPost = new Post({
                      user_id,
                      title,
                      category,
                      vista,
                      description
                  });
                  newPost.save()
                      .then(post1 =&gt; {
                          res.redirect('/home');
                      })
                      .catch(err =&gt; console.log(err));
                  };
              });
      };        
  });
  
  
  
  module.exports = router;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="posts__content"&gt;
      &lt;a href="#"&gt;
         &lt;h3&gt;&lt;%= post_mv.title %&gt;&lt;/h3&gt;
      &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  
  When logging into my website a user can create a post that inserts into MongoDB with the user's id included. I'm trying to display the title of the 1 post I have in my collection but I get an error that says 'cannot read 'title'property of undefined. Can anyone tell me what I am doing wrong? </p>