Created
August 10, 2015 09:25
-
-
Save sascha/08e7ce6383c26fbd30cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Network.Wai | |
import Network.Wai.Handler.Warp | |
import Network.HTTP.Types (status200) | |
import Blaze.ByteString.Builder (copyByteString) | |
import Data.Monoid | |
main = do | |
let port = 8080 | |
putStrLn $ "Listening on port " ++ show port | |
run port app | |
app req respond = respond $ | |
responseBuilder status200 [ ("Content-Type", "text/plain") ] $ mconcat $ map copyByteString [ "Hello World" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment