purescript-cookbook icon indicating copy to clipboard operation
purescript-cookbook copied to clipboard

Add a recipe or two to get people started with websockets

Open afcondon opened this issue 4 years ago • 1 comments

Recipe Name

WebSocketClient

Recipe Description

Open a Websocket, ie to ws://echo.websocket.org or suchlike and send a message and receive echo'd reply.

Obviously multiplies out to multiple recipes of the form WebSocketClientNode, WebSocketServerNode etc

In our meetup on June 6 2020 this repo was suggested as a basis but, from a quick look, i'm not sure that all it's dependencies are in current package set. Nonetheless the Client and Server programs in the Examples directory are very recipe-like, so they might be a good basis.

afcondon avatar Jul 07 '20 08:07 afcondon

I think you must have posted this 5 minutes after I started looking at PureScript websocket libraries. :) I can confirm for you the purescript-web/purescript-web-socket package works with the current package set (tested it after running spago upgrade-set for a new project).

Specifically, the driver-websockets example from the main purescript-halogen repo's examples folder. So that includes the aff-coroutines package working fine too.

I haven't looked into zudov/purescript-websocket-simple.

and-pete avatar Jul 07 '20 09:07 and-pete