title: MEAN stack application - querying by userId
body: <p>I have built an API to GET and POST values into a database(MongoDB) using NodeJS and Express.</p>
  
  <p>I am able to get only a single comment by the userid
  (localhost:3000/comments/userid/3)</p>
  
  <p>But I want to get all comments by a single user</p>
  
  <pre><code>/* GET /comments/userid/userid */
  router.get('/userid/:userid', function(req, res, next) {
    Comments.findOne({userId:req.params.userid}, function (err, post) {
      if (err) return next(err);
      res.json(post);
      })
  });
  </code></pre>
  
  <p>Is there any method to do this? Like the findOne method?</p>