Permalink
Browse files

Applied patch from Jeremy for the happstack code.

  • Loading branch information...
1 parent a4e3c27 commit c58eacdf3b82f8e8851d8739af20c5e21f51529b @mightybyte mightybyte committed Nov 5, 2010
Showing with 6 additions and 3 deletions.
  1. +6 −3 happstack/Main.hs
View
@@ -1,16 +1,19 @@
+{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Main where
import Control.Monad
import Happstack.Server
import System.Environment
+handlers :: ServerPart Response
handlers = msum
- [dir "pong" $ anyRequest $ ok $ toResponse "PONG"
- ,fileServe ["FiringGeometry.png"] "."
+ [ dir "pong" $ ok (toResponseBS "text/plain" "pong")
+ , serveFile (asContentType "image/png") "FiringGeometry.png"
]
+main :: IO ()
main = do
args <- getArgs
let p = if length args == 0 then 8000 else read $ head args
- simpleHTTP (nullConf {port = p}) handlers
+ simpleHTTP (nullConf {port = p, logAccess = Nothing}) handlers

0 comments on commit c58eacd

Please sign in to comment.