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 {
|
||||
appEnv = env
|
||||
, appPort = port
|
||||
, appRoot = pack $ hostS ++ maybeAddPort port
|
||||
, appRoot = pack $ hostS ++ addPort port
|
||||
, connectionPoolSize = read connectionPoolSizeS
|
||||
}
|
||||
where
|
||||
maybeAddPort :: Int -> String
|
||||
maybeAddPort 80 = ""
|
||||
maybeAddPort p = ":" ++ (show p)
|
||||
addPort :: Int -> String
|
||||
#ifdef PRODUCTION
|
||||
addPort _ = ""
|
||||
#else
|
||||
addPort p = ":" ++ (show p)
|
||||
#endif
|
||||
|
||||
-- Static setting below. Changing these requires a recompile
|
||||
|
||||
|
||||
@ -72,12 +72,15 @@ loadConfig env = do
|
||||
return $ AppConfig {
|
||||
appEnv = env
|
||||
, appPort = port
|
||||
, appRoot = pack $ hostS ++ maybeAddPort port
|
||||
, appRoot = pack $ hostS ++ addPort port
|
||||
}
|
||||
where
|
||||
maybeAddPort :: Int -> String
|
||||
maybeAddPort 80 = ""
|
||||
maybeAddPort p = ":" ++ (show p)
|
||||
addPort :: Int -> String
|
||||
#ifdef PRODUCTION
|
||||
addPort _ = ""
|
||||
#else
|
||||
addPort p = ":" ++ (show p)
|
||||
#endif
|
||||
|
||||
-- | The location of static files on your system. This is a file system
|
||||
-- path. The default value works properly with your scaffolded site.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user