From 76c744963a3e7cbfc2f7d3aa8a3321c3eb200aa2 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 20 May 2017 21:47:51 +0300 Subject: Rename index.html -> app.html Not to confuse Hackage. --- src/Application.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Application.hs b/src/Application.hs index bdedd5e..3c57079 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -24,6 +24,7 @@ import Network.Wai.Middleware.RequestLogger (Destination(Handle), mkRequestLogger, RequestLoggerSettings(destination, outputFormat), OutputFormat(CustomOutputFormat)) import Network.Wai.Middleware.Static (addBase, hasPrefix, staticPolicy, (>->)) +import System.FilePath.Posix (()) import System.IO (stderr) import Web.Scotty (ScottyM, ActionM, middleware, json, file, addroute, get, delete, status, text, param, scottyApp) @@ -47,7 +48,7 @@ myProcess ps logger dataDir = do middleware $ Gzip.gzip Gzip.def {Gzip.gzipFiles = Gzip.GzipCompress} middleware $ staticPolicy (hasPrefix "static" >-> addBase dataDir) - get "/" $ file (dataDir ++ "/" ++ "index.html") + get "/" $ file (dataDir "app.html") get "/serverlist.json" $ json (sort $ HM.keys ps) get "/server/:server/processlist.json" $ apiGetProcessList ps -- cgit v1.2.3