title: Websocket-Node On browser
body: <p>I have been testing websockets with nodejs and a few hundred clients. To use websockets with node I used the Websocket-Node module but now I am having problems testing this on the browser.</p>
  
  <p>The problem is how the client.js relies on the require function but it's not available browser side</p>
  
  <pre><code>var WebSocketClient = require('websocket').client;
  </code></pre>
  
  <p>Are they any ways to use node modules browser side? 
  I tried a few things like browserify and require.js but have not had any luck with them.</p>
  
  <p>I would rather avoid making big changes client side and Im not sure how different the set up would be using the websocket api trying to connect to the websocket-node one from the node server. </p>
  
  <p>edit: It was easier and faster just implementing it browser side with regular websockets than trying to find a library/module to use require() browser side </p>