This is a demo application to explore how Elm and JavaScript can interoperate.
The textbox and button on the left are driven entirely by Elm. The controls on the right are pure JavaScript. They communicate by sending messages over Elm ports.
This app is intended to be a learning/teaching tool for discovering how Elm can play nicely in a mixed-language browser world. There are many annotations explaining the techniques, but it's not an intro-level project. I learned what I know about Elm mainly from the Elm and Elm Signals videos from Pragmatic Studio and I can't recommend them highly-enough.
- After forking the project, install Elm
- In the project directory, run
elm package install
to get all the dependencies. - Run
elm make Main.elm
to compile the Elm code into JavaScript. The results will be inelm.js
. - Open
index.html
in your browser and everything should just work!