Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

hackage.haskell.org : firefly-example

Package maintainers For package maintainers and hackage trustees Candidates 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:

Registry - Source - Homepage - JSON
purl: pkg:hackage/firefly-example
Keywords: bsd3, program, web
License: BSD-3-Clause
Latest release: over 6 years ago
First release: over 6 years ago
Downloads: 857 total
Stars: 87 on GitHub
Forks: 2 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 12 days ago

    Loading...
    Readme
    Loading...