web: actually use the command line options (fixes #225)
This commit is contained in:
		
							parent
							
								
									f64d3c7944
								
							
						
					
					
						commit
						c2da13eb39
					
				| @ -53,7 +53,7 @@ mkYesodDispatch "App" resourcesApp | |||||||
| -- migrations handled by Yesod. | -- migrations handled by Yesod. | ||||||
| makeApplication :: WebOpts -> Journal -> AppConfig DefaultEnv Extra -> IO Application | makeApplication :: WebOpts -> Journal -> AppConfig DefaultEnv Extra -> IO Application | ||||||
| makeApplication opts j conf = do | makeApplication opts j conf = do | ||||||
|     foundation <- makeFoundation conf |     foundation <- makeFoundation conf opts | ||||||
|     writeIORef (appJournal foundation) j |     writeIORef (appJournal foundation) j | ||||||
|     app <- toWaiAppPlain foundation |     app <- toWaiAppPlain foundation | ||||||
|     return $ logWare app |     return $ logWare app | ||||||
| @ -62,8 +62,8 @@ makeApplication opts j conf = do | |||||||
|             | server_ opts = logStdout |             | server_ opts = logStdout | ||||||
|             | otherwise    = id |             | otherwise    = id | ||||||
| 
 | 
 | ||||||
| makeFoundation :: AppConfig DefaultEnv Extra -> IO App | makeFoundation :: AppConfig DefaultEnv Extra -> WebOpts -> IO App | ||||||
| makeFoundation conf = do | makeFoundation conf opts = do | ||||||
|     manager <- newManager |     manager <- newManager | ||||||
| #ifdef http_conduit_2 | #ifdef http_conduit_2 | ||||||
|                defaultManagerSettings |                defaultManagerSettings | ||||||
| @ -72,7 +72,7 @@ makeFoundation conf = do | |||||||
| #endif | #endif | ||||||
|     s <- staticSite |     s <- staticSite | ||||||
|     jref <- newIORef nulljournal |     jref <- newIORef nulljournal | ||||||
|     return $ App conf s manager defwebopts jref |     return $ App conf s manager opts jref | ||||||
| 
 | 
 | ||||||
| -- for yesod devel | -- for yesod devel | ||||||
| -- uses the journal specified by the LEDGER_FILE env var, or ~/.hledger.journal | -- uses the journal specified by the LEDGER_FILE env var, or ~/.hledger.journal | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user