@hackage scottish0.1.0.0

scotty with batteries included

Scotty web framework with batteries included. For configurations/states, you don't need to hand-roll your own monads every time. Scottish will manage it for you.

{-# LANGUAGE OverloadedStrings #-}

import Web.Scottish

import Data.Monoid (mconcat)
import Data.Monoid (mconcat)
import Data.Text.Lazy (Text)
import Network.HTTP.Types.Status (notFound404)

main = scottish' 3000 $ do
  setConfig (Just "beam")

  get "/" $ do
    beam <- getConfig :: ScottishActionM' (Maybe Text) () (Maybe Text)
    html $ mconcat ["<h1>Scotty, ", fromJust beam, " me up!</h1>"]

  get "/:word" $ do
    raise notFound404
Scotty
http://hackage.haskell.org/package/scotty