github action

master
pan 4 years ago
parent df215a41d4
commit c5bba0382c
  1. 3
      .github/workflows/blank.yml
  2. 2
      src/jsMain/kotlin/client.kt

@ -28,6 +28,3 @@ jobs:
SSH_PASS: ${{ secrets.SSH_PASS }} SSH_PASS: ${{ secrets.SSH_PASS }}
# Authentification token for ngrok # Authentification token for ngrok
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTHTOKEN }} NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTHTOKEN }}
NGROK_REGION: ap

@ -14,7 +14,7 @@ fun WebSocket.sendCommand(command: WebSocketClientCommand) {
fun main() { fun main() {
window.onload = { window.onload = {
val webSocket = WebSocket("ws://localhost:8080${Api.websocketPath}") val webSocket = WebSocket("ws://${window.location.host}${Api.websocketPath}")
webSocket.onopen = { event: Event -> console.info("打开连接:${event}") } webSocket.onopen = { event: Event -> console.info("打开连接:${event}") }
webSocket.onclose = { event: Event -> console.info("关闭连接:${event}") } webSocket.onclose = { event: Event -> console.info("关闭连接:${event}") }
webSocket.onerror = { event: Event -> console.error("发生错误:${event}") } webSocket.onerror = { event: Event -> console.error("发生错误:${event}") }

Loading…
Cancel
Save