twain: Tiny web application framework for WAI.

[ bsd3, library, web ] [ Propose Tags ]

Twain is tiny web application framework for WAI. It provides routing, parameter parsing, and a reader-like monad for composing responses from an environment.


[Skip to Readme]
Versions [RSS] [faq] 1.0.0.0
Change log changelog.md
Dependencies aeson (>=1.4 && <1.7), base (>=4.7 && <5), bytestring (==0.10.*), case-insensitive (==1.2.*), cookie (>=0.4 && <0.6), either (==5.0.*), http-types (==0.12.*), text (>=1.2.3 && <1.3), time (>=1.8 && <1.9.9), transformers (>=0.5.6 && <0.6), wai (==3.2.*), wai-extra (>=3.0 && <3.2), warp (>=3.2 && <3.4) [details]
License BSD-3-Clause
Copyright 2021 Alexander C. Mingoia
Author Alex Mingoia
Maintainer alex@alexmingoia.com
Category Web
Home page https://github.com/alexmingoia/twain#readme
Bug tracker https://github.com/alexmingoia/twain/issues
Source repo head: git clone https://github.com/alexmingoia/twain
Uploaded by alexmingoia at 2021-05-11T10:20:45Z
Distributions NixOS:1.0.0.0
Downloads 50 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-05-11 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for twain-1.0.0.0

[back to package description]

Twain

Hackage BSD3 License

Twain is a tiny web application framework for WAI.

  • Simple routing with path captures.
  • Parameter parsing of cookies, path, query, and body.
  • Compose responses from an app environment using a reader-like monad.
  • Helpers for redirects, headers, status codes.
  • Routes decompose into WAI middleware.
import Web.Twain

main :: IO ()
main = do
  twain 8080 "my app" $ do
    get "/" $ do
      send $ html "Hello, World!"