summaryrefslogtreecommitdiff
path: root/sw-ui/src/main/kotlin
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-23 02:28:52 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-23 02:28:52 +0200
commit0421191b8059868f52ed2ff304cf0ff6518fe33b (patch)
tree2f218775897e24796bbf6f0bba75010ca4b7b3e9 /sw-ui/src/main/kotlin
parentFix code style (diff)
downloadseven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.tar.gz
seven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.tar.bz2
seven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.zip
Fix production host
Diffstat (limited to 'sw-ui/src/main/kotlin')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt
index 45cc474b..5c426a51 100644
--- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt
+++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt
@@ -22,8 +22,8 @@ typealias SwSagaContext = SagaContext<SwState, RAction, WrapperAction>
@OptIn(ExperimentalCoroutinesApi::class)
suspend fun SwSagaContext.rootSaga() = coroutineScope {
val action = next<RequestChooseName>()
- val port = if (isProdEnv()) window.location.port.ifEmpty { "80" } else "8000"
- val session = SevenWondersClient().connect("localhost:$port")
+ val serverHost = if (isProdEnv()) window.location.host else "localhost:8000"
+ val session = SevenWondersClient().connect(serverHost)
console.info("Connected to Seven Wonders web socket API")
launch(start = CoroutineStart.UNDISPATCHED) {
bgstack15