hs-websockets-workshop

Intoroduction to websockets in Haskell

Stars
6
Committers
1

WebSockets Server in Haskell

Simple example implementation of websockets server in haskell.

  1. See Main.hs for instructions
  2. Client code already implemeted
  3. Nix and Stack ready
  4. Open live app
  5. Check cheat branch for example implementation

Nix

  • you can use cabal within nix-shell
  • to enable direnv use echo "use_nix" > .envrc && direnv allow
  • you can use nix-build to build project using nix

Stack

  • stack based workflow should be working. use stack --help to learn how to use it.

Intro

Today we're building:

  • simple steteful websockets based chat room
  • no database
  • using STM for state
  • no wai/warp
  • no MTL, tagless final etc. Beginner Haskell
  • persistent sessions, multiple connections per session etc.

More resources