/elm-js-chat-app

Elm Ports demo: internal chat app

Primary LanguageElmMIT LicenseMIT

Elm Ports Demo: internal chat app

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.

Building the project

  1. After forking the project, install Elm
  2. In the project directory, run elm package install to get all the dependencies.
  3. Run elm make Main.elm to compile the Elm code into JavaScript. The results will be in elm.js.
  4. Open index.html in your browser and everything should just work!

MIT LICENSE