on master help sign in
Some feedback on startup as to the configured options.
commit13968dd714cea81d1d31ca691236fe71b28c633b authorLeif Warner <abimelech@gmail.com> dateSat 12 Mar 2011, 22:00 (16 years ago) parentecb2a7f
1 file changed+2
warp.hs+2
warp.hs+2
@@ -5,6 +5,7 @@ import Network.Wai.Application.Static
55import Network.Wai.Handler.Warp (run)
66import System.Environment (getArgs)
77import System.Console.CmdArgs
8+import Text.Printf (printf)
89
910data Args = Args
1011 { docroot :: FilePath
@@ -20,6 +21,7 @@ main :: IO ()
2021main = do
2122 Args {..} <- cmdArgs defaultArgs
2223 args <- getArgs
24+ printf "Serving directory %s on port %d with %s index files.\n" docroot port (if noindex then "no" else show index)
2325 run port $ staticApp StaticSettings
2426 { ssFolder = docroot
2527 , ssIndices = if noindex then [] else index