scottish

scotty with batteries included

https://github.com/echaozh/scottish

Latest on Hackage:0.1.0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed and maintained by Zhang Yichao

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