'websocket + vue :get error connecting to websocket

I am beginner with websocket and i am trying to connect it with vue3 like this

 onMounted(() => {
  var connection = new WebSocket("wss://echo.websocket.org");
  connection.onopen = function () {
    console.log("Server opened");
  };
});

and I get this every time enter image description here

How can I fix this ?



Solution 1:[1]

Websocket.org is no longer available. https://www.lob.com/blog/websocket-org-is-down-here-is-an-alternative

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fabian Lehmann