Scotty

December 28, 2016

{-# LANGUAGE OverloadedStrings #-}

import Web.Scotty (scotty, get, html)

main :: IO ()
main = scotty 3000 $ do
  get "/" $ do
    html "Hello, world!"

Usage

$ curl -s https://earldouglas.com/notes/haskell-recipes.md |
  codedown sh | sh -s scotty.md scotty
Setting phasers to stun... (port 3000) (ctrl-c to quit)
$ curl -s localhost:3000
Hello, world!

References