title: Chaining multiple pieces of middleware for specific route in ExpressJS
body: <p>I want to just verify something but have't been able to find anything in the Express docs or online regarding this (although I know it's a feature).</p>
  
  <p>I could just test this out but I don't really have a nice template and would like to hear from the community.</p>
  
  <p>If I define a route in express like such:</p>
  
  <pre><code>app.get('/', function (req, res) {
    res.send('GET request to homepage');
  });
  </code></pre>
  
  <p>I can also define a middleware and load it directly, such as</p>
  
  <pre><code>middleware = function(req, res){
    res.send('GET request to homepage');
  });
  
  app.get('/', middleware)
  </code></pre>
  
  <p>However, I can also chain at least one of these routes to run extra middleware, such as authentication, as such:</p>
  
  <pre><code>app.get('/', middleware, function (req, res) {
    res.send('GET request to homepage');
  });
  </code></pre>
  
  <p>Are these infinitely chainable? Could I stick 10 middleware functions on a given route if I wanted to? I want to see the parameters that app.get can accept but like mentioned I can't find it in the docs.</p>