Sample application for my blog series on creating a Single Page CRUD app using Elm and Haskell
= Albums Haskell/Elm App Sample application for my blog series on creating a Single Page CRUD app using Elm and Haskell v0.1.0, 2015-12-29: published :library: Asciidoctor :numbered: :idprefix: :toc: macro
== Preconditions
=== Backend The backend is written in Haskell and uses https://haskell-servant.github.io/[servant] to serve a REST-api.
.You will need to install: . Haskell - You might want to install https://www.haskell.org/platform/[Haskell platform] . https://github.com/commercialhaskell/stack/blob/master/doc/installandupgrade.md[Stack]
=== Frontend The frontend is written in http://elm-lang.org/[Elm]
.You will need to install: . http://elm-lang.org/install[Elm platform]
== Get it up and running
Firstly just clone this repo. If you wish to try out the demo app corresponding with a particular episode of the accompanying blog series, checkout the appropriate tag (named after each episode)
=== Backend . Open a terminal and cd to
$albums/backend. (Optional/Depending on your ghc version in path) -
stack setup.
stack build.
stack exec albums
If you would like to hack with reload support: -
stack install halivealternatively clone https://github.com/lukexi/halive[halive] and build with stack manually (you might need to fiddle to ensure the ghc version used matches/is compatible with the backend app) -
stack exec halive src/Main.hs src- Edit/save and enjoy recompile and auto restart
You may test that it's up and running by
curl http://localhost:8081/artists/1
=== Frontend . Open a terminal and cd to
$albums/frontend.
elm-package install --yes.
npm install.
npm run dev
Open a browser window with the following url:
http://localhost:8090/
You should now be able to do changes on .elm files, and upon save get live reload.