Skip to content

Instantly share code, notes, and snippets.

@corruptmemory
Created January 14, 2012 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corruptmemory/1609921 to your computer and use it in GitHub Desktop.
Save corruptmemory/1609921 to your computer and use it in GitHub Desktop.
Warp/Haskell PONG
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.Wai.Handler.Warp
import Blaze.ByteString.Builder (fromByteString)
import Network.HTTP.Types (status200)
main = run 3000 $ const $ return $ ResponseBuilder
status200
[("Content-Type", "text/plain"), ("Content-Length", "4")]
$ fromByteString "PONG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment