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
|
module Application where
|
||||||
|
|
||||||
import Breve.Common
|
import Breve.Common
|
||||||
@ -22,8 +22,8 @@ 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"
|
||||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user