Scaffolding fixes
This commit is contained in:
parent
8c4a8102a0
commit
45a43ae5ee
@ -7,3 +7,4 @@ Yesod 0.10
|
|||||||
* Enumerators are gone, in come conduits, now you can catch exceptions!
|
* Enumerators are gone, in come conduits, now you can catch exceptions!
|
||||||
* Move from pool to resource-pool
|
* Move from pool to resource-pool
|
||||||
* Rework of the redirect system
|
* Rework of the redirect system
|
||||||
|
* Configure database parameters via environment variables.
|
||||||
|
|||||||
@ -29,7 +29,7 @@ library
|
|||||||
, shakespeare-css >= 0.10.5 && < 0.11
|
, shakespeare-css >= 0.10.5 && < 0.11
|
||||||
, shakespeare-js >= 0.10.4 && < 0.11
|
, shakespeare-js >= 0.10.4 && < 0.11
|
||||||
, template-haskell
|
, template-haskell
|
||||||
, yaml >= 0.5.1.1 && < 0.6
|
, yaml >= 0.5.1.2 && < 0.6
|
||||||
, unordered-containers
|
, unordered-containers
|
||||||
|
|
||||||
if !os(windows)
|
if !os(windows)
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import Yesod.Logger (Logger, logBS, toProduction)
|
|||||||
import Network.Wai.Middleware.RequestLogger (logHandle)
|
import Network.Wai.Middleware.RequestLogger (logHandle)
|
||||||
#endif
|
#endif
|
||||||
import qualified Database.Persist.Store~importMigration~
|
import qualified Database.Persist.Store~importMigration~
|
||||||
import Network.HTTP.Conduit (newManagerIO)
|
import Network.HTTP.Conduit (newManager, def)
|
||||||
|
|
||||||
-- Import all relevant handler modules here.
|
-- Import all relevant handler modules here.
|
||||||
import Handler.Root
|
import Handler.Root
|
||||||
@ -36,10 +36,11 @@ mkYesodDispatch "~sitearg~" resources~sitearg~
|
|||||||
-- migrations handled by Yesod.
|
-- migrations handled by Yesod.
|
||||||
getApplication :: AppConfig DefaultEnv Extra -> Logger -> IO Application
|
getApplication :: AppConfig DefaultEnv Extra -> Logger -> IO Application
|
||||||
getApplication conf logger = do
|
getApplication conf logger = do
|
||||||
manager <- newManagerIO 10
|
manager <- newManager def
|
||||||
s <- staticSite
|
s <- staticSite
|
||||||
dbconf <- withYamlEnvironment "config/~dbConfigFile~.yml" (appEnv conf)
|
dbconf <- withYamlEnvironment "config/~dbConfigFile~.yml" (appEnv conf)
|
||||||
Database.Persist.Store.loadConfig
|
Database.Persist.Store.loadConfig >>=
|
||||||
|
Database.Persist.Store.applyEnv
|
||||||
p <- Database.Persist.Store.createPoolConfig (dbconf :: Settings.PersistConfig)~runMigration~
|
p <- Database.Persist.Store.createPoolConfig (dbconf :: Settings.PersistConfig)~runMigration~
|
||||||
let foundation = ~sitearg~ conf setLogger s p manager
|
let foundation = ~sitearg~ conf setLogger s p manager
|
||||||
app <- toWaiAppPlain foundation
|
app <- toWaiAppPlain foundation
|
||||||
|
|||||||
@ -95,5 +95,5 @@ executable ~project~
|
|||||||
, monad-control >= 0.3 && < 0.4
|
, monad-control >= 0.3 && < 0.4
|
||||||
, wai-extra >= 1.0 && < 1.1
|
, wai-extra >= 1.0 && < 1.1
|
||||||
, yaml >= 0.5 && < 0.6
|
, yaml >= 0.5 && < 0.6
|
||||||
, http-conduit >= 1.1 && < 1.2
|
, http-conduit >= 1.2 && < 1.3
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user