not sure it's meant to be used in the browser but for servers it's damn good!
Oh yes, bun.sh! It crossed by multiple times now and I've wrote down a todo to research this tool further.. Thx for the reminder, because https://bun.sh/docs/api/websockets#connect-to-a-websocket-server is really looking interesting to build a proof-of-concept Nostr client with it. My choice would be to include it in a Vue project as I'm familar with that framework.
And yes as you're saying, basicly you can also build a relay implementation with it...how cool!
Discussion
For sure it's also meant for clients! 😉
Look at this list:
#e97600aab8d8d5c3d290f881b39f7366631d159c0cdf20eb07cf2e154a25570c which could find at the bottom of https://bun.sh