Description
scotty with batteries included.
Description
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
README.md
Scottish
Provides global read-only configuration and global/action-local read-write states to Scotty.
For now, scottish
also provides helpers for database access, especially with persistent.