diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2026-05-03 22:35:05 +0200 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2026-05-03 22:35:05 +0200 |
| commit | 61270c31ae292d504c2d43b84d4291c2377e31d7 (patch) | |
| tree | 735c6175c431d8ba9629a3e1a66cc1ffbdd55845 /mini-http/Main.hs | |
| parent | ac596adc7455831eed092f69be97fafaefb53ffe (diff) | |
Convert from wai/warp to mini-http-server
Diffstat (limited to 'mini-http/Main.hs')
| -rw-r--r-- | mini-http/Main.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mini-http/Main.hs b/mini-http/Main.hs new file mode 100644 index 0000000..08e66c1 --- /dev/null +++ b/mini-http/Main.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main where + +import Data.ByteString.Char8 qualified as BS8 + +import Network.HTTP.Server.Mini + + +main :: IO () +main = + run defaultSettings { setPort = 8000 } $ \req -> + return (responseBS status200 [("Content-Type", "text/plain")] (BS8.pack (show req))) |
