Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 657 Bytes

README.md

File metadata and controls

22 lines (13 loc) · 657 Bytes

WebSockets - Live Demo

This is a minimal example of how to connect to a WebSocket. It connects to wss://echo.websocket.org which just repeats whatever you say.

Demo

The important code lives in src/Main.elm and in index.html with comments!

Building Locally

Run the following commands:

git clone https://github.com/elm-community/js-integration-examples.git
cd js-integration-examples/websockets

elm make src/Main.elm --output=elm.js
open index.html

Some terminals may not have an open command, in which case you should open the index.html file in your browser another way.