packages feed

warp-static 0.2.0.1 → 0.2.1

raw patch · 2 files changed

+4/−4 lines, 2 files

Files

warp-static.cabal view
@@ -1,5 +1,5 @@ Name:                warp-static-Version:             0.2.0.1+Version:             0.2.1 Synopsis:            Static file server based on Warp and wai-app-static Homepage:            http://github.com/snoyberg/warp-static License:             BSD3@@ -9,6 +9,7 @@ Category:            Web Build-type:          Simple Cabal-version:       >=1.2+Description:         Static file server based on Warp and wai-app-static   Executable warp
warp.hs view
@@ -6,7 +6,6 @@     , fileName, toFilePath     ) import Network.Wai.Handler.Warp (run)-import System.Environment (getArgs) import System.Console.CmdArgs import Text.Printf (printf) import System.Directory (canonicalizePath)@@ -17,7 +16,7 @@ import qualified Data.Map as Map import qualified Data.ByteString.Char8 as S8 import Control.Arrow ((***))-import Data.Text (pack, unpack)+import Data.Text (pack)  data Args = Args     { docroot :: FilePath@@ -30,6 +29,7 @@     }     deriving (Show, Data, Typeable) +defaultArgs :: Args defaultArgs = Args "." ["index.html", "index.htm"] 3000 False False False []  main :: IO ()@@ -38,7 +38,6 @@     let mime' = map (toFilePath *** S8.pack) mime     let mimeMap = Map.fromList mime' `Map.union` defaultMimeTypes     docroot' <- canonicalizePath docroot-    args <- getArgs     unless quiet $ printf "Serving directory %s on port %d with %s index files.\n" docroot' port (if noindex then "no" else show index)     let middle = gzip False                . (if verbose then debug else id)