For package maintainers and hackage trustees
Firefly is dead simple http framework written in Haskell.
It strives for simplicity in implementation (and in use).
It's great for people learning Haskell, fiddling with Monads,
or who just need a really simple server for something.
Here's the minimal app:
Just that easy!
Check out the Example App for more!
Specify your routes using regex patterns, the first one which matches will run.
Handler is a monad with access to the incoming request. You can access parts
of it using helpers, then return a response.
Here are some valid response types and their inferred Content-Type
There are more in Web.Firefly.Response.
You can specify your status code using (body, Status) where body is any of
the above types and Status is an Integer status code.
Or, add headers too with (body, Status, HeaderMap) where HeaderMap is a map
of names to values.
Let's write some more interesting handlers:
Here's an example of responding with JSON:
You should use Firefly if:
Don't use Firefly if: