-
Notifications
You must be signed in to change notification settings - Fork 6
NODE 1428: Adapt express and koa to use HTTP/2 #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, but a few minor things.
express/index.js
Outdated
if (isHttps) { | ||
server = https.createServer(options, app); | ||
} else if (isHttp2) { | ||
server = http2.createServer(options, app); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want http2.createSecureServer(options, app)
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like spdy has a createSecureServer
method: https://github.com/spdy-http2/node-spdy
…ng certificate when using HTTP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was some confusion because the ticket specifies:
but according to some of the documentation included in that same ticket: https://www.perimeterx.com/tech-blog/2019/http2/
So I'm assuming it was a typo and that Koa should be adapted to use the native HTTP/2 library and Express should use Spdy. It doesn't look like Express will be compatible with the native library any time soon: expressjs/express#3388