Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (30 sloc) 779 Bytes


  • Install MongoDB. On Mac: brew install mongo
  • Create database directory: mkdir db
  • Build and install: cabal install
  • Now you have an executable beercounter


Start the mongoDB server:

Start beercounter:


Running in GHCI

Start GHCI with beercounter source directories:


Load Server.hs and start it:

:l Server

Server is now running. Use Ctrl-C to stop it and :q to exit GHCI.

Building the executable

Build with cabal:

cabal install


Buy a round:

curl -d '{"buyer":"juha", "others":["juho", "atte"]}' localhost:8000/buyRound

Check karma:

curl localhost:8000/karma/juho/atte
Jump to Line
Something went wrong with that request. Please try again.