use staticDevel in scaffold
This commit is contained in:
parent
1b8c016557
commit
2adc337fa1
@ -25,6 +25,7 @@ module Yesod.Static
|
||||
, StaticRoute (..)
|
||||
-- * Smart constructor
|
||||
, static
|
||||
, staticDevel
|
||||
, embed
|
||||
-- * Template Haskell helpers
|
||||
, staticFiles
|
||||
|
||||
@ -61,7 +61,11 @@ with~sitearg~ conf logger f = do
|
||||
takeMVar flag
|
||||
#endif
|
||||
where
|
||||
#ifdef PRODUCTION
|
||||
s = static Settings.staticDir
|
||||
#else
|
||||
s = staticDevel Settings.staticDir
|
||||
#endif
|
||||
|
||||
-- for yesod devel
|
||||
withDevelAppPort :: Dynamic
|
||||
|
||||
@ -40,7 +40,11 @@ with~sitearg~ conf logger f = do
|
||||
let h = ~sitearg~ conf logger s
|
||||
toWaiApp h >>= f
|
||||
where
|
||||
#ifdef PRODUCTION
|
||||
s = static Settings.staticDir
|
||||
#else
|
||||
s = staticDevel Settings.staticDir
|
||||
#endif
|
||||
|
||||
with~sitearg~LoadConfig :: Settings.AppEnvironment -> (Application -> IO a) -> IO a
|
||||
with~sitearg~LoadConfig env f = do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user