This is a simple self-contained TODO list implemented in Elm. It uses simple
demo persistance via html 5 localstorage saveItem and loadItem
Carry out the following steps:
- Ensure that Elm infrastructure is installed: https://guide.elm-lang.org/install.html
- Clone the repo from https://github.com/mauget/elm-todo.git
- Compile Main.elm to elm.js using a command from the project root:
elm make src/Main.elm --output=elm.js - Open ./index.html in a browser; no server needed for this application
We added layout and style to the UI via index.html links to Bootstrap 4 CSS and local styles. A screenshot of the app follows.
Local storage, as used here, is simplistic demo persistance. It caches the
todo list via an Elm flag and port, using JavaScript within the index.html
<script> tag. The downside:
- Each persisted todo collection exists uniquely in each given vendor browser-URL.
- Distinct tabs or windows of a given browser-url combination replace the single list at each UI event.
Realistic multi-client data persistence could be implemented via Elm http. See An Introduction to Elm - HTTP.
Follow the guidelines at Elm Language Intallation
