title: creating websocket server in electron node for external client request
body: <p>I am trying to create a websocket server that listen to an external websocket clinet. 
  the point is I am laoding a web base application inside my browser window in electron.
  for example : win.loadURL(www.something.com); so the websocket call coming from this url 
  meaning if I getinto this url in browser in my network tab I see websocket call is keep 
  calling but there is no server. so I want to implement the server inside my electron app main.js. and here is my code: </p>
  
  <pre><code>const WebSocket = require("ws");
  const wss = new WebSocket.Server({port: 8102});
  
  wss.on("connection", ws =&gt; {
      ws.on("message", message =&gt; {
          console.log("received: %s", message);
      });
      ws.send("something");
  });
  </code></pre>
  
  <p>so far I did not get any success. any help would appriciate. </p>