-
Notifications
You must be signed in to change notification settings - Fork 81
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
Support Express v5 in @connectrpc/connect-fastify #1297
Support Express v5 in @connectrpc/connect-fastify #1297
Conversation
Signed-off-by: Timo Stamm <[email protected]>
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.
- Passes conformance tests
- Example works as expected
Note that Express does not support the Node.js `http2` module. You can serve the | ||
Connect protocol and gRPC-Web with Express, but not gRPC. |
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.
V2 gRPC clients do not support H1: #1279
@@ -97,8 +97,10 @@ function main() { | |||
switch (req.httpVersion) { | |||
case HTTPVersion.HTTP_VERSION_1: | |||
server = req.useTls | |||
? https.createServer(serverOptions, app) | |||
: http.createServer(app); | |||
? // eslint-disable-next-line @typescript-eslint/no-misused-promises -- typing issue in express |
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.
Not sure why eslint considers this to be a promise misuse. Either way, it isn't something we can fix, since it's an issue with Express' typings.
"tsx": "^4.19.0" | ||
}, | ||
"peerDependencies": { | ||
"express": "^4.18.2 || ^5.0.1", |
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.
Not sure why we didn't have a peer dependency for express before.
This relaxes the peer dependency constraint on express to include ^5.0.1.
Closes #1293.