KO
|
EN
gitlite โ search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#claude-code
#codex
#cli
#developer-tools
#react
#windows
twain
โ 73
Open GitHub โ
Tiny web application framework for WAI.
Download README (.md)
Explore Similar Repositories
TwASP
:
No description available.
nuxt-twa-module
:
๐ฑNuxt module to transform your PWA into an Android app, using Trusted Web Activities (TWA)
TWallet
:
A highly modularized white-labeling digital wallet framework
ctwas
:
causal TWAS (cTWAS)
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
twain
?
Download (.md)
# Twain [](http://hackage.haskell.org/package/twain)  Twain is a tiny web application framework for [WAI](http://hackage.haskell.org/package/wai). - `ResponderM` for composing responses with do notation. - Routing with path captures that decompose `ResponderM` into middleware. - Parameter parsing from cookies, path, query, and body. - Helpers for redirects, headers, status codes, and errors. ```haskell {-# language OverloadedStrings #-} import Network.Wai.Handler.Warp (run) import Web.Twain main :: IO () main = do run 8080 $ foldr ($) (notFound missing) routes routes :: [Middleware] routes = [ get "/" index , post "/echo/:name" echoName ] index :: ResponderM a index = send $ html "Hello World!" echoName :: ResponderM a echoName = do name <- param "name" send $ html $ "Hello, " <> name missing :: ResponderM a missing = send $ html "Not found..." ```