 <p>Alright three things here.</p> <p><strong>1.</strong> Your <code>res.end</code> is sending <code>Hell world</code> but it should send <code>data</code></p> <p><code>res.end("Hell World");</code></p> <p>should be</p> <p><code>res.end(data);</code></p> <p><em>This is because we want to display the index.html file not a hello world</em></p> <p><strong>2.</strong> Your index.html is calling the socket.io js file wrong</p> <p><code>&lt;script src="/node_modules/socket.io/socket.io.js"&gt;&lt;/script&gt;</code></p> <p>should be</p> <p><code>&lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt;</code></p> <p><em>This is because you cannot reference a file like that because there is no logic for it in your code. socket.io does however have the logic for it and can be called this way</em></p> <p><strong>3.</strong> Use emit on the client side</p> <p>In your index.html change this code</p> <p><code>socket.on('dataChanged', function(data){console.log("Hello World")});</code></p> <p>to </p> <p><code>socket.emit('dataChanged', 'this is a test')</code></p> <p>and remove </p> <p><code>io.emit('dataChanged', 'this is a test')</code></p> <p>from your nodejs file</p> <p><strong>Now you can see Hello World from your console</strong></p>