Blankeos
Explore posts from serversHave you guys ever gotten websockets to work on Hono + `@hono/vite-dev-server` plugin?
This occurs for Bun and Node.
1. On Bun, I can serve websockets using
import { createBunWebSocket } from 'hono/bun';
https://github.com/honojs/vite-plugins/issues/148
2. On Node, I can serve websockets using ws
and import { serve } from '@hono/node-server'
__
But the issues are:
1. On Bun, the websocket handler gets stuck. No idea why: https://github.com/honojs/vite-plugins/issues/140. Had some hypothesis that it conflicts with vite, but not too sure.
2. On Node, I can't even run the websocket handler because the mechanism is completely different when running it in dev. In particular, you'd have to get the server first, then attach it there.5 replies
Proper error logging and tracing?
Do you guys have an example repo that properly sets up error logs and trace?
It seems too difficult to trace here (in the image). As you can see it only traces back to the library-code that threw the error.
I kinda have to to manually trace which function actually threw that error in my code. Which was around here:
2 replies
When there's an error on my typescript code on Hono, Vite Dev Server crashes, and doesn't restart
Problem:
- Error? Crash the dev server and not wait for file changes.
Ideal experience:
- Error? Say it's an error and wait for file changes.
It kinda feels iffy that I need to run
npm run dev
again just to run the dev server. Any fixes for this or maybe just something I missed?
My config looks like this:
2 replies