I am trying to capture server events in Elm. But I could not find the library. Or I do not know what this can do by default.
Here is the JavaScript code I wanted to write in Elm.
var source = new EventSource(
'/event-stream?channel=channel&t=' + new Date().getTime());
There is an obvious job: I am writing JS code and port in an Elm application. But I think it will pollute the code. If I can have both in Elm, and maybe I can join the Stream / Signal application, it will become fully responsive to the server. This is the ultimate goal.
Please let me know if any further details are required.
PS: the above code is the base code of Html5.
source
share