<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
</head>
<body>
<script>



    var webSocket = new WebSocket(
        "ws://localhost:8080/game"
    );

    webSocket.onopen = function (){
        console.log("onopen")
    }

    webSocket.onmessage = function(msg){
        console.log(msg)
    }

    webSocket.onerror = function( err ){
        console.log(err)
    }


</script>
</body>
</html>