Fork me on GitHub
#ring
<
2022-01-18
>
Mutasem Hidmi12:01:59

Hi guys. Is it possible to add websocket support to a ring webserver?

magnars12:01:36

Might be, but I've usually switched to http-kit when needing websockets or server sent events. It is pretty much a drop-in replacement.

dharrigan13:01:02

Yes, it's very possible.

dharrigan13:01:13

Have a look at sente as a possible library to consider

dharrigan13:01:24

Or, yes, http-kit will work too 🙂

dharrigan13:01:08

I put up an example of using sente with reitit (that uses ring underneath) here:

🎉 1
dharrigan13:01:22

along with using a plain-old-javascript websockets invocation here:

Mutasem Hidmi13:01:11

Thanks. I will take a look now.