diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-05-20 21:47:51 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-05-20 21:47:54 +0300 |
commit | 76c744963a3e7cbfc2f7d3aa8a3321c3eb200aa2 (patch) | |
tree | be78c5b7be4bc3958ac43c6e37ee7de99accb59b /src | |
parent | 40f6fd333b551eae338daf1fa4d4526725766636 (diff) | |
download | mywatch-76c744963a3e7cbfc2f7d3aa8a3321c3eb200aa2.tar.gz |
Rename index.html -> app.html
Not to confuse Hackage.
Diffstat (limited to 'src')
-rw-r--r-- | src/Application.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |