title: Using Express middleware in Firebase Functions HTTPS requests
body: <p>I'm having a problem using Express middleware with Firebase Functions. In this <a href="https://github.com/firebase/functions-samples/blob/master/authorized-https-endpoint/functions/index.js" rel="nofollow noreferrer">example</a> a function is hooked to the app() instance like so:</p>
  
  <pre><code>app.get('*', (req, res) =&gt; {
    res.send(`Hello ${req.user.name}`);
  });
  
  exports.authorizedHello = functions.https.onRequest(app);
  </code></pre>
  
  <p>How do I go about having multiple functions using express middleware?</p>
  
  <p>This is one of the ways I've tried solving it but calling the endpoints returns a 404:</p>
  
  <pre><code>app.get('/authorizedHello', (request, response) =&gt; {
      response.send(`Hello ${request.user.name}`);
  })
  
  app.get('/authorizedBye', (request, response) =&gt; {
      response.send(`Bye ${request.user.name}`);
  })
  
  exports.authorizedHello = functions.https.onRequest(app);
  exports.authorizedBye = functions.https.onRequest(app);
  </code></pre>
  
  <p>I'm sure I'm just doing it wrong. Could you point me in the right direction?</p>