WebSockets Server in Haskell
Simple example implementation of websockets server in haskell.
- See
Main.hs
for instructions
- Client code already implemeted
- Nix and Stack ready
- Open live app
- 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