title: Using req.query in express with the request module
body: <p>I am currently using Mikeal's request module in express. I am trying to get a bunch of data from two json urls and put them into a table. I want to be able to define two dates to use in the json url in <strong>req.query</strong> but I'm not too sure how. Right now, I'm able to define the dates in my terminal but I want to get rid of that. This is what I have so far. </p>
  
  <pre><code>var request = require('request);
  var link = https://examplelink.json;
  var args = process.argv.splice(2);
  var date1 = args[0];
  var date2 = args[1];
  var express = require('express');
  
  var app = express();
  app.set('views', __dirname + '/views');
  app.set('view engine', 'ejs');    
  
  app.get('/', function(req, res) {
      request.get({url: link + date1, json: true}, function(err, body, a) {
          if (err) {
              return res.send(500);
          }
          request.get({url: link + date2, json: true}, function(err, body, b) {
              if (err) {
                   return res.send(500);
              }
              res.render('table' { a: a, b: b});
         });
  }):
  
  var number = 7000;
  app.listen(number);
  console.log("Listening at " + number);
  </code></pre>
  
  <p>This is a simplified version but I hope it gets the message across. I would like to modify this so that I don't have to define the dates with <em>args</em> and I can do it in the url. </p>
  
  <p>Thanks so much </p>