Load the new settings
This commit is contained in:
parent
dd91af6b39
commit
492edca20d
@ -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"
|
||||
|
@ -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)
|
||||
ServerSettings {..} <- newServerSettings
|
||||
putStrLn ("Serving on " ++ bindUrl)
|
||||
app (runSettings warpSettings . logStdout)
|
Loading…
Reference in New Issue
Block a user