title: How do I use http2 with Node on Heroku (using Koa)
body: <p>I have the following code...</p>
  <pre><code>const PORT = process.env.PORT || 5000;
  const app = new Koa();
  ...
  app.listen(PORT)
  </code></pre>
  <p>This works great both locally and in Heroku. So now I want to use Http2 so I change to the following...</p>
  <pre><code>const server = http2.createSecureServer(
      {
          &quot;key&quot;: fs.readFileSync('./server-key.pem'),
          &quot;cert&quot;: fs.readFileSync('./server-cert.pem')
      }, 
      app.callback()
  )
  server.listen(PORT);
  </code></pre>
  <p>This works ok locally, however, when I upload to Heroku I get...</p>
  <pre><code>2021-06-24T00:43:00.383108+00:00 heroku[router]: at=error code=H13 desc=&quot;Connection closed without response&quot; method=GET path=&quot;/&quot; host=my-app.herokuapp.com request_id=604f4a2c-8dd2-4cfa-9cf2-3cce5ef76070 fwd=&quot;...&quot; dyno=web.1 connect=0ms service=1ms status=503 bytes=0 protocol=https
  </code></pre>
  <p>So how do I get http2 working with Node, Koa, and Heroku?</p>