APPROOT environment variable
This commit is contained in:
parent
12f530a1e7
commit
4c0f523457
@ -85,9 +85,15 @@ fromArgs getExtra = do
|
|||||||
}
|
}
|
||||||
config <- loadConfig cs
|
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
|
return $ if port args /= 0
|
||||||
then config { appPort = port args }
|
then config' { appPort = port args }
|
||||||
else config
|
else config'
|
||||||
|
|
||||||
-- | Load your development config (when using @'DefaultEnv'@)
|
-- | Load your development config (when using @'DefaultEnv'@)
|
||||||
loadDevelopmentConfig :: IO (AppConfig DefaultEnv ())
|
loadDevelopmentConfig :: IO (AppConfig DefaultEnv ())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user