diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2016-06-08 05:00:16 +0800 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2016-06-08 23:42:31 +0800 |
commit | 8a02852030716dbdbd64efdd4954ab9ac8f828f9 (patch) | |
tree | 690a216e08f4a2d97dfe80886fd2053f4283c4b0 /src/Server.hs | |
parent | 50fbf638a92b0dfc85b9000bc026911f798dede8 (diff) | |
download | juandelacosa-8a02852030716dbdbd64efdd4954ab9ac8f828f9.tar.gz |
Simple Web UI for changing password
Using Bootstrap & jQuery.
Diffstat (limited to 'src/Server.hs')
-rw-r--r-- | src/Server.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Server.hs b/src/Server.hs index ee9aad2..10d4328 100644 --- a/src/Server.hs +++ b/src/Server.hs @@ -23,8 +23,8 @@ import Application (app) type Listen = Either Port FilePath -server :: Listen -> ConnectInfo -> IO () -server socketSpec mysqlConnInfo = +server :: Listen -> ConnectInfo -> FilePath -> IO () +server socketSpec mysqlConnInfo dataDir = bracket ( do sock <- createSocket socketSpec @@ -40,7 +40,8 @@ server socketSpec mysqlConnInfo = destroyAllResources mysql ) ( \(sock, mysql) -> do listen sock maxListenQueue - runSettingsSocket defaultSettings sock (app mysql) ) + hPutStrLn stderr $ "Static files from `" ++ dataDir ++ "'" + runSettingsSocket defaultSettings sock =<< app mysql dataDir) createSocket :: Listen -> IO Socket |