refactor: correct admin server port setting
For admin server, port server-setting was set to the same port as app server port. This doesn't have any effect because it is overridden by the already initialized admin server socket, but it's better to explicitly correct it to avoid anything unexpected. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
@@ -106,7 +106,12 @@ run appState = do
|
||||
address <- resolveSocketToAddress mainSocket
|
||||
observer $ AppServerAddressObs address
|
||||
|
||||
Warp.runSettingsSocket (serverSettings conf & setOnException onWarpException) mainSocket app
|
||||
let
|
||||
appServerSettings = serverSettings conf
|
||||
& setPort (configServerPort conf)
|
||||
& setOnException onWarpException
|
||||
|
||||
Warp.runSettingsSocket appServerSettings mainSocket app
|
||||
where
|
||||
observer = AppState.getObserver appState
|
||||
|
||||
@@ -129,7 +134,6 @@ serverSettings :: AppConfig -> Warp.Settings
|
||||
serverSettings AppConfig{..} =
|
||||
defaultSettings
|
||||
& setHost (fromString $ toS configServerHost)
|
||||
& setPort configServerPort
|
||||
& setServerName ("postgrest/" <> prettyVersion)
|
||||
|
||||
-- | PostgREST application
|
||||
|
||||
Reference in New Issue
Block a user