RobinTail / express-zod-api

A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
https://ez.robintail.cz
MIT License
619 stars 30 forks source link

Exp: HTTP/2 #2099

Closed RobinTail closed 1 hour ago

RobinTail commented 5 days ago

Experiments regarding #2092

coveralls-official[bot] commented 5 days ago

Coverage Status

coverage: 100.0%. remained the same when pulling f8f223fb1e526286313a7ec3268059b415a3210b on try-http2 into 5ca76bc71242fa11c89a0bd268660c83b5f7bacf on make-v21.

RobinTail commented 4 days ago

Crashes with

TypeError: Cannot read properties of undefined (reading 'readable')
    at IncomingMessage._read (node:_http_incoming:214:19)
    at Readable.read (node:internal/streams/readable:737:12)
    at resume_ (node:internal/streams/readable:1255:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on IncomingMessage instance at:
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at errorOrDestroy (node:internal/streams/destroy:238:7)
    at Readable.read (node:internal/streams/readable:739:7)
    at resume_ (node:internal/streams/readable:1255:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Something is messed up with a prototype chain. This seems to be a compatibility issue with Node >= 15, the bridge and spdy as well:

https://github.com/expressjs/express/issues/3388
https://github.com/rahulramesha/http2-express-bridge/issues/11
https://github.com/spdy-http2/node-spdy/issues/380
RobinTail commented 4 days ago

UPD: found a way to use spdy-fixes conditionally, using same pair of servers

RobinTail commented 1 hour ago

https://github.com/RobinTail/express-zod-api/pull/2099#discussion_r1808111742