title: Failed to load resource: the server responded with a status of 426 (Upgrade Required)
body: <p>I tried to go with the tutorial of this link <a href="http://web-engineering.info/node/57" rel="nofollow">http://web-engineering.info/node/57</a></p>
  
  <p>But when I execute node server.js and open the browser <a href="http://localhost:3434" rel="nofollow">http://localhost:3434</a> it says  upgrade required. The server.js file is:</p>
  
  <pre><code>var WebSocketServer = require('ws').Server,
  wss = new WebSocketServer({port: 3434});
  wss.broadcast = function (data) {
    var i = 0, n = this.clients ? this.clients.length : 0, client = null;
    for (; i &lt; n; i++) {
      client = this.clients[i];
      if (client.readyState === client.OPEN) {
        client.send(data);
      }
      else console.error('Error: the client state is ' + client.readyState);
    }  
  };
  
  wss.on('connection', function (ws) {
   ws.on('message', function (message) {
     wss.broadcast(message);
   });
  });
  </code></pre>