@hackage Spock0.9.0.0
Another Haskell web framework for rapid development
Categories
License
BSD-3-Clause
Maintainer
Alexander Thiemann <mail@athiemann.net>
Links
Versions
Installation
Dependencies (32)
- aeson >=0.7
- base >=4 && <5
- base64-bytestring >=1.0
- bytestring >=0.10
- case-insensitive >=1.1
- containers >=0.5 Show all…
Dependents (11)
@hackage/Spock-auth, @hackage/scalp-webhooks, @hackage/Spock-lucid, @hackage/acme-everything, @hackage/shelduck, @hackage/tsweb, Show all…
Spock
Intro
Hackage: Spock Stackage: Spock
Another Haskell web framework for rapid development
Library Usage Example
{-# LANGUAGE OverloadedStrings #-}
import Web.Spock
import qualified Data.Text as T
main =
runSpock 3000 $ spockT id $
do get ("echo" <//> var) $ \something ->
text $ T.concat ["Echo: ", something]
For more examples check the examples/ directory.
Install
- Using cabal:
cabal install Spock - Using Stack:
stack install Spock - From Source (cabal):
git clone https://github.com/agrafix/Spock.git && cd Spock && cabal install - From Source (stack):
git clone https://github.com/agrafix/Spock.git && cd Spock && stack build
Features
Another Haskell web framework for rapid development: This toolbox provides everything you need to get a quick start into web hacking with haskell:
- fast routing (both typesafe and "untyped")
- middleware
- json
- sessions
- cookies
- database helper
- csrf-protection
- typesafe contexts
Benchmarks:
Important Links
Talks
- German: Moderne typsichere Web-Entwicklung mit Haskell (by Alexander Thiemann)
- German: reroute-talk (by Tim Baumann)
Candy
Extensions
The following Spock extensions exist:
- Background workers for Spock: Spock-worker
- Digestive functors for Spock: Spock-digestive
Works well with Spock
- User management users
- Data validation validate-input
- Blaze bootstrap helpers blaze-bootstrap
- digestive-forms bootstrap helpers digestive-bootstrap
Example Projects
Companies / Projects using Spock
- http://cp-med.com
- http://openbrain.co.uk
- http://findmelike.com
- https://www.tramcloud.net
- http://thitp.de
Notes
Since version 0.7.0.0 Spock supports typesafe routing. If you wish to continue using the untyped version of Spock you can Use Web.Spock.Simple. The implementation of the routing is implemented in a separate haskell package called reroute.
Since version 0.5.0.0 Spock is no longer built on top of scotty. The design and interface is still influenced by scotty, but the internal implementation differs from scotty's.
Thanks to
- Tim Baumann Github (lot's of help with typesafe routing)
- Tom Nielsen Github (much feedback and small improvements)
Misc
Supported GHC Versions
- 7.6.3
- 7.8.4
- 7.10.2
License
Released under the BSD3 license. (c) 2013 - 2015 Alexander Thiemann