Spock travis-ci

Another Haskell web framework for rapid development

Spock

Build Status Hackage Hackage Spock-Core

Documentation: Spock 0.11.0.0

Intro

Another Haskell web framework for rapid development. To get started with Spock, check our tutorial or take a look at our example project funblog!

Mailing list

Please join our mailing list at [email protected]

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 typesafe routing
  • middleware
  • json
  • sessions
  • cookies
  • database helper
  • csrf-protection
  • typesafe contexts

Important Links

Talks

Candy

Extensions

The following Spock extensions exist:

Works well with Spock

SSL / HTTPS

If you’d like to use your application via HTTPS, there are two options:

  • Use nginx/haproxy/… as reverse proxy in front of the Spock application.
  • Convert the Spock application to a wai-application using the spockAsApp. Then use the warp-tls package to run it.

Benchmarks

See the Spock-bench repository to reproduce.

Framework GHC Version simple route route with one param deeply nested route
Spock 7.10.2 0.11.0.0 69243 65835 64763
scotty 7.10.2 0.10.2 66441 65357 9542
snap 7.10.2 0.9.8.0 39964 35566 38356
fn 7.10.2 0.2.0.2 63083 63183 22346
servant 7.10.2 0.7 66041 65590 64606

Notes

Since version 0.11.0.0 Spock drops simple routing in favor of typesafe routing and drops safe actions in favor of the “usual” way of csrf protection with a token.

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)
  • … and all other awesome contributors!

Hacking

Pull requests are welcome! Please consider creating an issue beforehand, so we can discuss what you would like to do. Code should be written in a consistent style throughout the project. Avoid whitespace that is sensible to conflicts. (E.g. alignment of = signs in functions definitions) Note that by sending a pull request you agree that your contribution can be released under the BSD3 License as part of the Spock package or related packages.

Misc

Supported GHC Versions

  • 7.8.4
  • 7.10.2
  • 8.0

License

Released under the BSD3 license. © 2013 - 2016 Alexander Thiemann

Related Repositories

spock-example

spock-example

Spock example specifications along with ready-to-go Ant, Gradle, and Maven builds ...

spock-reports

spock-reports

This project creates a global extension to Spock to create test reports. ...

android-spock

android-spock

Running Spock on Android ...

java-testing-with-spock

java-testing-with-spock

Code samples from the book "Java testing with Spock" ...

grails-spock-examples

grails-spock-examples

Grails project with tests based on Spock. ...


Top Contributors

agrafix dancingrobot84 nmk cdepillabout cschneid lloucas-imvu timjb echaozh akirak loisch dylex sol skogsbaer glutamate UlfS paldepind rabisg

Releases

-   v0.6.0.0 zip tar
-   v0.5.1.0 zip tar
-   v0.5.0.0 zip tar
-   0.11.0.0 zip tar
-   0.10.0.1 zip tar
-   0.10.0.0 zip tar
-   0.9.0.1 zip tar
-   0.9.0.0 zip tar
-   0.8.1.0 zip tar
-   0.8.0.0 zip tar
-   0.7.12.0 zip tar
-   0.7.11.0 zip tar
-   0.7.10.0 zip tar
-   0.7.9.0 zip tar
-   0.7.8.0 zip tar
-   0.7.7.0 zip tar
-   0.7.6.0 zip tar
-   0.7.5.2 zip tar
-   0.7.5.1 zip tar
-   0.7.5.0 zip tar
-   0.7.4.0 zip tar
-   0.7.3.0 zip tar
-   0.7.2.0 zip tar
-   0.7.1.0 zip tar
-   0.7.0.0 zip tar
-   0.6.6.1 zip tar
-   0.6.6.0 zip tar
-   0.6.5.0 zip tar
-   0.6.3.0 zip tar
-   0.6.2.3 zip tar