rawhat / mist

gleam HTTP server. because it glistens on a web
Apache License 2.0
260 stars 11 forks source link

Include sending a message back to the client in complete example #53

Open dyerw opened 2 weeks ago

dyerw commented 2 weeks ago

I'm trying to get to grips with this library and build something and the documentation has overall been very good. What would be helpful is if instead of just stubbing out new_subject() in the complete example if there could be a minimal implementation of sending a Custom message to the websocket and forwarding it to the client from elsewhere in the application code. This is especially helpful if a new user is trying to do something with websockets but doesn't have the familiarity with the gleam_otp package to pick up intuitively how they'd use the Selector type.

(I posted the specific issue I'm having in the Gleam discord but going forward I think this would help others learning the library)