Sample application for my blog series on creating a Single Page CRUD app using Elm and Haskell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Albums Haskell/Elm App

1. Preconditions

1.1. Backend

The backend is written in Haskell and uses servant to serve a REST-api.

You will need to install:
  1. Haskell - You might want to install Haskell platform

  2. Stack

1.2. Frontend

The frontend is written in Elm

You will need to install:
  1. Elm platform

2. 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)

2.1. Backend

  1. Open a terminal and cd to $albums/backend

  2. (Optional/Depending on your ghc version in path) - stack setup

  3. stack build

  4. stack exec albums

If you would like to hack with reload support: - stack install halive alternatively clone 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

2.2. Frontend

  1. Open a terminal and cd to $albums/frontend

  2. elm-package install --yes

  3. npm install

  4. 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.