Quickstart with Scotty
masterScotty is a lightweight, Sinatra-inspired Haskell web framework built on WAI and Warp. You can define a web application by specifying HTTP verbs (like get), URL patterns, and returning text content. It is template-agnostic; any value that can be converted to Text can be used to render a page.
To run a basic Scotty application, use runghc on a source file or use stack exec if you have the package installed via Stack.
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
main = scotty 3000 $
get "/:word" $ do
beam <- pathParam "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]