hi, I've set up a websocket devserver in my `build...
# javascript
a
hi, I've set up a websocket devserver in my
build.gradle.kts
file but I'm getting an error in the application logs
Copy code
<i> [webpack-dev-server] [HPM] Upgrading to WebSocket
<e> [webpack-dev-server] [HPM] WebSocket error: Error: read ECONNRESET
<e>     at TCP.onStreamRead (node:internal/stream_base_commons:220:20) {
<e>   errno: -4077,
<e>   code: 'ECONNRESET',
<e>   syscall: 'read'
<e> }
If I hardcode the websocket server URL to
<ws://localhost:8080/ws>
of course it works - but I don't want to hard code it. I couldn't find any examples or documentation on this. Has anyone managed to set up websockets with Kotlin/JS? What's the best practice? I'm using Kotlin/JS 1.7.0 and KVision 5.10.1. More details in #kvision here and on StackOverflow here
huh weird, it looks like this stops the error
Copy code
"/ws/foo" to mapOf(
              "target" to "<ws://localhost:12080>",
//              "secure" to false,
              "ws" to true,
//              "changeOrigin" to true,
            ),
websocker server is up at
<ws://localhost:12080/ws/foo>
, the browser is pointing to
<ws://localhost:3000/ws/foo>
I'm not getting any data, but that might be a bug on the websocket server side (coroutines are confusing)