title: websocket send parameter in connection?
body: <p>I have a scenario which I need to create a very simple text chat using <code>nodejs</code> and <code>Websocket</code>.</p>
  
  <p>I have everything set up and working.</p>
  
  <p>I now need to allow users to send a parameter in the websocket <code>connection</code> URL.</p>
  
  <p>Like so: <code>websocket = new WebSocket("ws://test-website.net:8080/?id=55");</code></p>
  
  <p>in my reserach I came across quite a few similar questions and found out that I can pass the parameters in the URL like the example above.</p>
  
  <p>However, none of them mentions or explains how to get this parameter (<em>55 in this example</em>) in <code>server.js</code></p>
  
  <pre><code>wss.on('connection', function(ws) {
  
  ///I need to get the parameter here////
  
  });
  </code></pre>
  
  <p>Could someone please advice on this issue?</p>
  
  <p>Thanks in advance.</p>