You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to use Express server with http2.createSecureServer for HTTP/2? #6863
I previously used spdy for HTTP/2. However, due to spdy-http2/node-spdy#403 and the repo is inactive, I would like to consider using node native HTTP/2 but there are some caveats. The express app uses a lot of interfaces which work with other third-party libraries like app.use, app.set, app.enable in order to use view engines, setting the views and static artifacts folder, etc. How to achieve this using the http2.createSecureServer? I don't see that in https://nodejs.org/api/http2.html
Minimal Reproduction
import fs from 'fs';
import { app } from './index.js';
import http2 from 'http2';
const options = {
key: fs.readFileSync('server.key'),
cert: fs.readFileSync('server.crt')
};
app.set('port', port);
const server = http2.createSecureServer(options, app);
Hi @krzysdz, I’d like to work on this issue. I’m interested in understanding the current Express server architecture and exploring how http2.createSecureServer() could be used with Express.
Would it be possible to assign this issue to me? I’ll first investigate the current limitations and the related discussions before proposing an implementation.
Activity
krzysdz commentedon Oct 28, 2025
Express doesn't support HTTP/2 yet. There's a bit more information in expressjs/discussions#407 and #5462.
BhavishTrehan77 commentedon Oct 5, 2026
Hi @krzysdz, I’d like to work on this issue. I’m interested in understanding the current Express server architecture and exploring how
http2.createSecureServer()could be used with Express.Would it be possible to assign this issue to me? I’ll first investigate the current limitations and the related discussions before proposing an implementation.