title: Why is req.params returning 'undefined'?
body: <p>I have a simple comments app which enables the user to enter a comment into the system via a form and these are then logged onto a list on the bottom of the page.</p>
  
  <p>I wanted to modify it so that a user could click a comments title once it is created and it would load up the associated content that goes with that comment.</p>
  
  <p>I have modified my route in the app.js to lookup the <code>:id</code>:</p>
  
  <p>And have also modified my main <strong>Show.js</strong> route to use the <code>id</code> as an argument in a <code>findOne</code> command to locate the comment.</p>
  
  <p>I have also put in a <code>console.log()</code> command to log out the <code>req.params.id</code></p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  var mongoose = require('mongoose');
  var Comment = mongoose.model('Comment', Comment);
  
  router.get('/', function(req, res) {
          Comment.findOne({ id: req.params.id }, function(err, comment){
              console.log(req.params.id)
          });
  });
  
  module.exports = router;
  </code></pre>
  
  <p>However, all I am getting back is an <code>undefined</code> message in my terminal.</p>
  
  <p>If I place the <code>console.log()</code> directly in my app.js, I get the id logged as intended.</p>
  
  <pre><code>app.use('/:id', function(req,res) {
      console.log(req.params.id)
  });
  </code></pre>
  
  <p>Am I missing something in my route that is stopping my from getting the id parameter?</p>