A very simple to use Package that provides your Elm program access to the PhoenixJS API.
In order for your Elm program to talk to PhoenixJS, you will need to add a
JavaScript file to your Phoenix project and a very small Port module to your
Elm src
files.
The JS file you need, and set up instructions are
here
.
The Port module you need, and set up instructions are
here
.
elm install phollyer/elm-phoenix-websocket
A Phoenix application that provides an Elm SPA with a dozen examples can be found here.
The relevant Elm files for the examples are here.
A live version of the example application is running here.
Package docs.
For more information about Phoenix WebSockets see Phoenix.Channel , Phoenix.Presence and PhoenixJS.
- Add
pushSequence
function. I would like to add the ability to provide a list of pushes that will be actioned in sequence. This will need to handle some decision making based on if a push succeeds, errors, or results in a timeout. I will be looking into this as soon as I am able to find the time. Pull requests are welcome.