@hackage snap-server1.1.2.1
A web server for the Snap Framework
Categories
License
BSD-3-Clause
Maintainer
snap@snapframework.com
Links
Versions
Installation
Tested Compilers
Dependencies (25)
- base >=4.6 && <5
- bytestring >=0.9.1 && <0.13
- containers >=0.3 && <0.8
- filepath >=1.1 && <2.0
- mtl >=2.0 && <2.4
- text >=0.11 && <2.2 Show all…
Dependents (52)
@hackage/hermes, @hackage/websockets-snap, @hackage/darcsden, @hackage/roshask, @hackage/wreq, @hackage/elm-server, Show all…
Package Flags
portable
(off by default)
Compile in cross-platform mode. No platform-specific code or optimizations such as C routines will be used.
openssl
(off by default)
Enable https support using the HsOpenSSL library.
build-pong
(off by default)
Build a server that just returns PONG
? Normally useful only
for benchmarks.
build-testserver
(off by default)
Build the blackbox testserver?
debug
(off by default)
Enable support for debugging.
Snap Framework HTTP Server Library
This is the Snap Framework HTTP Server library. For more information about
Snap, read the README.SNAP.md
or visit the Snap project website at
http://www.snapframework.com/.
The Snap HTTP server is a high performance web server library written in
Haskell. Together with the snap-core
library upon which it depends, it
provides a clean and efficient Haskell programming interface to the HTTP
protocol.
Building snap-server
Dependencies
To build the Snap HTTP server, you need to cabal install
the snap-core
library (which should have come with this package).
Optional dependencies
If you would like SSL support, snap-server
requires the
openssl library.
Building snap-server
The snap-server library is built using Cabal and Hackage. Just run
cabal install
to install snap-server.
If you would like SSL support, pass the openssl
flag to cabal install
:
cabal install -fopenssl
Building the Haddock Documentation
The haddock documentation can be built using the supplied haddock.sh
shell
script:
./haddock.sh
The docs get put in dist/doc/html/
.
Building the testsuite
The snap-server
has a fairly comprehensive test suite. To build and run it,
cd
into the test/
directory and run
$ cabal configure # for the stock backend, or..
$ cabal configure -fopenssl # for the SSL backend
$ cabal build
From here you can invoke the testsuite by running:
$ ./runTestsAndCoverage.sh
The testsuite generates an hpc
test coverage report in test/dist/hpc
.