Websockets
Am I missing something I got this error and I don't found how to fix it with the doc (screenshot from hono node module)
I also checked if my setup was correct and it was like this (screenshot where we see initsocket())
9 Replies
Here is my socket init
And when trying to connect with postman I just can't
Sorry this is late. I opened an issue for this today if you want to see what’s causing it. The only fix right now is in bun serve only do fetch: app.fetch do not return the fetch. If you are trying to get the ip from Bun as of right now there is no way around this
GitHub
WebSockets In Bun · Issue #2696 · honojs/hono
What version of Hono are you using? 4.3.7 What runtime/platform is your app running on? Bun What steps can reproduce the bug? If you Bun.serve and return app.fetch() it will not allow Bun to switch...
@mathys this has been fixed in the latest version of Hono. There is now a helper to get an ip address to fix this issue
as the doc being updated didn't saw this on the website
ConnInfo Helper - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
I will update the bun specific part where it shows the old way
tks again