@hackage scotty0.7.2
Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp
Categories
License
BSD-3-Clause
Maintainer
Andrew Farmer <afarmer@ittc.ku.edu>
Links
Versions
Installation
Dependencies (16)
- aeson >=0.6.2.1 && <0.8
- base >=4.3.1 && <5
- blaze-builder >=0.3.3.0 && <0.4
- bytestring >=0.10.0.2 && <0.11
- case-insensitive >=1.0.0.1 && <1.2
- conduit >=1.1 && <1.2 Show all…
Dependents (106)
@hackage/wrecker, @hackage/microformats2-parser, @hackage/web-rep, @hackage/hspec-wai, @hackage/Spock, @hackage/Villefort, Show all…
Scotty
A Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp.
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.Monoid (mconcat)
main = scotty 3000 $ do
get "/:word" $ do
beam <- param "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
Scotty is the cheap and cheerful way to write RESTful, declarative web applications.
- A page is as simple as defining the verb, url pattern, and Text content.
- It is template-language agnostic. Anything that returns a Text value will do.
- Conforms to WAI Application interface.
- Uses very fast Warp webserver by default.
See examples/basic.hs to see Scotty in action. (basic.hs needs the wai-extra package)
> runghc examples/basic.hs
Setting phasers to stun... (port 3000) (ctrl-c to quit)
(visit localhost:3000/somepath)
As for the name: Sinatra + Warp = Scotty.
Copyright (c) 2012-2013 Andrew Farmer