I'm running with this example. And it works. However, if I ran another instance, I expect it to crash with an exception, but didn't. The expected exception should say something like "Port 3000 already in use", which is a similar error when you run two python -m SimpleHTTPServer 8000
in different terminals.
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.Monoid (mconcat)
main = scotty 3000 $
get "/:word" $ do
beam <- param "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]