#Any pointers on working with websockets in Remix?
1 messages · Page 1 of 1 (latest)
Don't think websockets work yet, but Server-Sent Events are supported.
there's an example using the Express adapter and socket.io
Netlify don't support being a WS server but you can deploy a socket.io server somewhere else and keep your Remix app in Netlify
the example shows how to use the same Express server to run both WS and Remix
this is the example https://github.com/remix-run/examples/tree/main/socket.io
We've just been doing all our websockets Client side for now.
WS has a client and a server-side part
Haha, my brain is too deep into my own project. We have an external backend outside of remix, so our websockets are handled there
I just assumed they meant using some public websocket data for a feed
sorry guys i went to sleep after asking this question haha
but yeah i was asking about client side WS, my bad
we have a separate backend for our api atm
so i assume i can just use WS on the client like any other client library?
Yeah, create the WS connection inside an effect and that’s it
awesome, thanks!