Load the new settings

This commit is contained in:
rnhmjoj 2015-04-10 23:25:52 +02:00
parent dd91af6b39
commit 492edca20d
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Application where module Application where
import Breve.Common import Breve.Common
@ -21,9 +21,9 @@ logStr = liftIO . putStrLn
app :: (Application -> IO ()) -> IO () app :: (Application -> IO ()) -> IO ()
app runner = do app runner = do
settings <- newAppSettings settings <- newAppSettings
(baseUrl,_) <- serverSettings ServerSettings {..} <- newServerSettings
table <- records table <- load urlTable
css <- getDataFileName "layouts/main.css" css <- getDataFileName "layouts/main.css"
index <- getDataFileName "views/index.html" index <- getDataFileName "views/index.html"

View File

@ -1,4 +1,4 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings, RecordWildCards #-}
import Application import Application
import Breve.Common import Breve.Common
@ -9,6 +9,6 @@ import Network.Wai.Middleware.RequestLogger
main :: IO () main :: IO ()
main = do main = do
(url, settings) <- serverSettings ServerSettings {..} <- newServerSettings
putStrLn ("Serving on " ++ url) putStrLn ("Serving on " ++ bindUrl)
app (runSettings settings . logStdout) app (runSettings warpSettings . logStdout)