never mind 80, just don't show port in PRODUCTION
Works when you don't deploy to port 80
This commit is contained in:
parent
e6bab578fc
commit
1e98a69319
@ -91,13 +91,16 @@ loadConfig env = do
|
|||||||
return $ AppConfig {
|
return $ AppConfig {
|
||||||
appEnv = env
|
appEnv = env
|
||||||
, appPort = port
|
, appPort = port
|
||||||
, appRoot = pack $ hostS ++ maybeAddPort port
|
, appRoot = pack $ hostS ++ addPort port
|
||||||
, connectionPoolSize = read connectionPoolSizeS
|
, connectionPoolSize = read connectionPoolSizeS
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
maybeAddPort :: Int -> String
|
addPort :: Int -> String
|
||||||
maybeAddPort 80 = ""
|
#ifdef PRODUCTION
|
||||||
maybeAddPort p = ":" ++ (show p)
|
addPort _ = ""
|
||||||
|
#else
|
||||||
|
addPort p = ":" ++ (show p)
|
||||||
|
#endif
|
||||||
|
|
||||||
-- Static setting below. Changing these requires a recompile
|
-- Static setting below. Changing these requires a recompile
|
||||||
|
|
||||||
|
|||||||
@ -72,12 +72,15 @@ loadConfig env = do
|
|||||||
return $ AppConfig {
|
return $ AppConfig {
|
||||||
appEnv = env
|
appEnv = env
|
||||||
, appPort = port
|
, appPort = port
|
||||||
, appRoot = pack $ hostS ++ maybeAddPort port
|
, appRoot = pack $ hostS ++ addPort port
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
maybeAddPort :: Int -> String
|
addPort :: Int -> String
|
||||||
maybeAddPort 80 = ""
|
#ifdef PRODUCTION
|
||||||
maybeAddPort p = ":" ++ (show p)
|
addPort _ = ""
|
||||||
|
#else
|
||||||
|
addPort p = ":" ++ (show p)
|
||||||
|
#endif
|
||||||
|
|
||||||
-- | The location of static files on your system. This is a file system
|
-- | The location of static files on your system. This is a file system
|
||||||
-- path. The default value works properly with your scaffolded site.
|
-- path. The default value works properly with your scaffolded site.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user