The scotty package

[Tags: bsd3, library]

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.

As for the name: Sinatra + Warp = Scotty.

WAI
http://hackage.haskell.org/package/wai
Warp
http://hackage.haskell.org/package/warp

[Skip to ReadMe]

Properties

Versions0.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 (info)
Change logchangelog.md
Dependenciesaeson (>=0.6.2.1 && <0.8), base (>=4.6 && <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.*), 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 (>=3.0.0 && <3.1), wai-extra (>=3.0.0 && <3.1), warp (>=3.0.0 && <3.1) [details]
LicenseBSD3
Copyright(c) 2012-2014 Andrew Farmer
AuthorAndrew Farmer <afarmer@ittc.ku.edu>
MaintainerAndrew Farmer <afarmer@ittc.ku.edu>
Stabilityexperimental
CategoryWeb
Home pagehttps://github.com/scotty-web/scotty
Bug trackerhttps://github.com/scotty-web/scotty/issues
Source repositoryhead: git clone git://github.com/scotty-web/scotty.git
UploadedTue Jun 10 15:02:55 UTC 2014 by AndrewFarmer
UpdatedThu Jun 25 21:22:17 UTC 2015 by AdamBergmark to revision 1
DistributionsFedora:0.9.0, LTSHaskell:0.9.1, NixOS:0.10.2, Stackage:0.10.2
Downloads16372 total (900 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for scotty-0.8.0

Scotty Build StatusCoverage Status

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.

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