title: real-time socket.io client web browser
body: <p>I'm trying to create a simple local web-server that collects real time data from a remote server. The remote server is not under my control and it streams out text lines continuosly.</p>
  
  <p>I think scocket.io is Ok for that purpose but I'm really new to node.js and I don't know where is the problem. I've installed socket.io with:</p>
  
  <p>npm install socket.io</p>
  
  <p>then I wrote a simple index.html page deployed in my www dir:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
      &lt;script src="socket.io/socket.io.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          var socket = io.connect('http://192.168.1.100:8888');
          socket.on('data', function(msg) {
              var val = msg;
               $('#data_value').html(val);
          })
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Data Stream&lt;/h1&gt;
          lines: &lt;span id="data_value"&gt;&lt;/span&gt;&lt;br/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I load index.html with the browser I can see the web page with the correct title and the the string "lines:" but no data is printed out.</p>
  
  <p>If I try to directly browse the remote server at <a href="http://92.168.1.100:8888" rel="nofollow noreferrer">http://92.168.1.100:8888</a> I can see the stream.</p>
  
  <p>Can you help me?</p>