From 492edca20d7bfa0ee4de3171e20d741a199ebe54 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Fri, 10 Apr 2015 23:25:52 +0200 Subject: [PATCH] Load the new settings --- src/Application.hs | 8 ++++---- src/Main.hs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Application.hs b/src/Application.hs index 8253924..22d420d 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Application where import Breve.Common @@ -21,9 +21,9 @@ logStr = liftIO . putStrLn app :: (Application -> IO ()) -> IO () app runner = do - settings <- newAppSettings - (baseUrl,_) <- serverSettings - table <- records + settings <- newAppSettings + ServerSettings {..} <- newServerSettings + table <- load urlTable css <- getDataFileName "layouts/main.css" index <- getDataFileName "views/index.html" diff --git a/src/Main.hs b/src/Main.hs index 286c4f0..ad054bc 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, RecordWildCards #-} import Application import Breve.Common @@ -9,6 +9,6 @@ import Network.Wai.Middleware.RequestLogger main :: IO () main = do - (url, settings) <- serverSettings - putStrLn ("Serving on " ++ url) - app (runSettings settings . logStdout) \ No newline at end of file + ServerSettings {..} <- newServerSettings + putStrLn ("Serving on " ++ bindUrl) + app (runSettings warpSettings . logStdout) \ No newline at end of file