diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-23 02:28:52 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-23 02:28:52 +0200 |
commit | 0421191b8059868f52ed2ff304cf0ff6518fe33b (patch) | |
tree | 2f218775897e24796bbf6f0bba75010ca4b7b3e9 /sw-ui | |
parent | Fix code style (diff) | |
download | seven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.tar.gz seven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.tar.bz2 seven-wonders-0421191b8059868f52ed2ff304cf0ff6518fe33b.zip |
Fix production host
Diffstat (limited to 'sw-ui')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt | 4 |
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) { |