How does the front desk initiate a webSocket request connection without

  node.js, question

The background created the webSocket service with, but I want to create the connection with the original code.

I hope I can look at the relevant information before asking questions. This is indeed a very, very basic question. The basic code is as follows:

var ws = new WebSocket(“ws://”);
 ws.onopen = function(){ws.send(“Test!”  );   };
 ws.onmessage = function(evt){console.log(;  };
 ws.onclose = function(evt){console.log(“WebSocketClosed!”  );  };
 ws.onerror = function(evt){console.log(“WebSocketError!”  );  };