Learning elm routing via https://github.com/sporto/elm-tutorial
I downloaded the PDF version of @sporto's Elm Tutorial: https://www.elm-tutorial.org/en/
Then hand-wrote all the examples so that I would see the errors when I made typos/mistakes. I encourage you to do the same so you learn to read the debug/compiler error messages.
To run the code in this example, run the following:
git clone https://github.com/nelsonic/elm-tutorial-app.git && cd elm-tutorial-app
npm install && elm-package install --yes
note: if you don't have
elm
orelm-package
installed goto: https://guide.elm-lang.org/install.html
npm start
Now Open the "App" in your web browser: http://localhost:3000/
You should see:
Click to "Edit" one of the players:
Increment or decrement.
That's it.
The reason this tutorial is a bit more
than the typical increment/decrement example is that it's
fetching the data from the "database" when the app starts
and saving the records to the db.json
"database".