Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -0,0 +1,20 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
import Network.Wai
|
||||
import Network.Wai.Handler.Warp
|
||||
import Network.HTTP.Types (status200)
|
||||
import Blaze.ByteString.Builder (copyByteString)
|
||||
import qualified Data.ByteString.UTF8 as BU
|
||||
import Data.Monoid
|
||||
|
||||
main = do
|
||||
let port = 8080
|
||||
putStrLn $ "Listening on port " ++ show port
|
||||
run port app
|
||||
|
||||
app req respond = respond $
|
||||
case pathInfo req of
|
||||
x -> index x
|
||||
|
||||
index x = responseBuilder status200 [("Content-Type", "text/plain")] $ mconcat $ map copyByteString
|
||||
[ "Hello World!\n" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue