web: actually use the command line options (fixes #225)

This commit is contained in:
Simon Michael 2015-06-25 07:32:37 -07:00
parent f64d3c7944
commit c2da13eb39

View File

@ -53,7 +53,7 @@ mkYesodDispatch "App" resourcesApp
-- migrations handled by Yesod.
makeApplication :: WebOpts -> Journal -> AppConfig DefaultEnv Extra -> IO Application
makeApplication opts j conf = do
foundation <- makeFoundation conf
foundation <- makeFoundation conf opts
writeIORef (appJournal foundation) j
app <- toWaiAppPlain foundation
return $ logWare app
@ -62,8 +62,8 @@ makeApplication opts j conf = do
| server_ opts = logStdout
| otherwise = id
makeFoundation :: AppConfig DefaultEnv Extra -> IO App
makeFoundation conf = do
makeFoundation :: AppConfig DefaultEnv Extra -> WebOpts -> IO App
makeFoundation conf opts = do
manager <- newManager
#ifdef http_conduit_2
defaultManagerSettings
@ -72,7 +72,7 @@ makeFoundation conf = do
#endif
s <- staticSite
jref <- newIORef nulljournal
return $ App conf s manager defwebopts jref
return $ App conf s manager opts jref
-- for yesod devel
-- uses the journal specified by the LEDGER_FILE env var, or ~/.hledger.journal