title: Usage of bodyParser.text() in Express with EJS
body: <p>I am building a search engine app with Express that queries the Twitter API v1.1. Currently, I am trying to submit the search string to my server by parsing form data with the bodyParser module.  Here is the code:</p>
  
  <p>index.ejs</p>
  
  <pre><code>...
  &lt;form method="GET" action="/results"&gt;
      &lt;input id="input" type="text" name="search"&gt;
      &lt;button id="searchButton"&gt;+&lt;/button&gt;
  &lt;/form&gt;
  ...
  </code></pre>
  
  <p>server.js</p>
  
  <pre><code>var express = require('express'),
      bodyParser = require('body-parser');
  
  var app = express();
  
  var port = process.env.PORT || 8080;
  
  app.set('view engine', 'ejs');
  
  app.use(express.static(__dirname + "/public");
  
  var urlencodedParser = bodyParser.urlencoded({ extended: false })
  
  app.get('/', function(req, res) {
      res.render('index');
  });
  
  app.get('/results', urlencodedParser, function (req, res) {
      console.log(req.body);
      res.render('results')
  });
  
  app.listen(port, function() {
      console.log('Our app is running on http://localhost:' + port);
  });
  </code></pre>
  
  <p>The code shown will return <em>{ }</em> to the console.  If I try and access req.body.search it returns <em>undefined</em> (obviously).  What is the issue here?  Why is it not logging my search string?</p>