Can't integrate hono with tus server
Anyone here used Tus:
@tus/server
I'm having difficulty using hono with it. Here are the different examples of using it with other providers: https://github.com/tus/tus-node-server/tree/main/packages/server#example-integrate-tus-into-express
here is what I tried:
I keep getting: TypeError: req.on is not a function
(probably from the tus server)2 Replies
so a core problem here is that hono has a different request architecture
tus (and express) expect
req
to be IncomingMessage
, while hono gives you access to Context
and the Request
i suspect this is because hono strives to be cross-runtime compatible. e.g., IncomingMessage
may not be available in cloudflare
something like this might work: https://stackoverflow.com/questions/67049890/how-can-i-turn-a-node-js-http-incomingmessage-into-a-fetch-request-object
but you'd need to go the other wayThanks for the reply. Appreciate it!
For now I have tus as a separate service, but when I go into prod I will circle back and correct based on your link.
For now I have tus as a separate service, but when I go into prod I will circle back and correct based on your link.