title: "Mount" (run) legacy http handler in Hapi.js
body: <p>I did a Node.js meetup presentation and was unable to answer this question. It is still bothering me.</p>
  
  <p>Suppose I have a legacy http application or an Express.js application. It is a function, of the form</p>
  
  <pre><code>function legacy_app(request, response) {
    // Handle the request.
  }
  </code></pre>
  
  <p>Suppose I adopt Hapi.js for new versions of my application. But I have lots of debugged legacy or upstream code which I wish to integrate into the Hapi application. For example, a legacy vhost will run the legacy version, or it is accessible inside a <code>/legacy</code> namespace in the URL.</p>
  
  <p>What is the best way to do this?</p>