A revised version of the scotty library that attempts to be simpler and more performant.

LTS Haskell 6.35:0.6.0
Stackage Nightly 2016-05-25:0.6.0
Latest on Hackage:0.6.0

See all snapshots growler appears in

MIT licensed by Ian Duncan
Maintained by [email protected]
This version can be pinned in stack with:growler-0.6.0@sha256:ea46b272d4b6b6ca3c834fe757615c8780333fb684bbda641362eb5b520aebcb,3331

Growler provides a very similar interface to scotty, with slight tweaks for performance and a few feature tradeoffs. Growler provides the ability to abort actions (handlers) with arbitrary responses, not just in the event of redirects or raising errors. Growler avoids coercing everything into lazy Text values and reading the whole request body into memory. It also eliminates the ability to abort the handler and have another handler handle the request instead (Scotty's next function).

API is still in flux, so use at your own risk. Pull requests / issues are welcome.

{-# LANGUAGE OverloadedStrings #-}

import Web.Growler
import Data.Monoid ((<>))

main = growl id defaultConfig $ do
  get "/" $ text "Hello, World!"
  get "/:name" $ do
    name <- param "name"
    text ("Hello, " <> name <> "!")