scotty: Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp
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.
As for the name: Sinatra + Warp = Scotty.
- WAI
- http://hackage.haskell.org/package/wai
- Warp
- http://hackage.haskell.org/package/warp
[Skip to Readme]
Downloads
- scotty-0.7.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.0.1, 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6, 0.12, 0.12.1, 0.20, 0.20.1, 0.21, 0.22, 0.30 (info) |
|---|---|
| Change log | changelog.md |
| Dependencies | 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.3), conduit (>=1.1 && <1.2), conduit-extra (>=1.1 && <1.2), data-default (>=0.5.3 && <0.6), http-types (>=0.8.2 && <0.9), mtl (>=2.1.2 && <2.3), regex-compat (>=0.95.1 && <0.96), text (>=0.11.3.1 && <1.2), transformers (>=0.3.0.0 && <0.5), wai (>=2.0.0 && <2.2), wai-extra (>=2.0.1 && <2.2), warp (>=2.1.1 && <2.2) [details] |
| License | BSD-3-Clause |
| Copyright | (c) 2012-2014 Andrew Farmer |
| Author | Andrew Farmer <[email protected]> |
| Maintainer | Andrew Farmer <[email protected]> |
| Uploaded | by SimonHengel at 2014-05-28T06:05:58Z |
| Category | Web |
| Home page | https://github.com/scotty-web/scotty |
| Bug tracker | https://github.com/scotty-web/scotty/issues |
| Source repo | head: git clone git://github.com/scotty-web/scotty.git |
| Distributions | Arch:0.22, Debian:0.11.6, Fedora:0.22, LTSHaskell:0.22, NixOS:0.22, Stackage:0.22 |
| Reverse Dependencies | 63 direct, 44 indirect [details] |
| Downloads | 65401 total (148 in the last 30 days) |
| Rating | 2.5 (votes: 6) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Successful builds reported [all 1 reports] |