APPROOT environment variable

This commit is contained in:
Michael Snoyman 2012-04-25 17:32:20 +03:00
parent 12f530a1e7
commit 4c0f523457

View File

@ -85,9 +85,15 @@ fromArgs getExtra = do
}
config <- loadConfig cs
env' <- getEnvironment
let config' =
case lookup "APPROOT" env' of
Nothing -> config
Just ar -> config { appRoot = T.pack ar }
return $ if port args /= 0
then config { appPort = port args }
else config
then config' { appPort = port args }
else config'
-- | Load your development config (when using @'DefaultEnv'@)
loadDevelopmentConfig :: IO (AppConfig DefaultEnv ())