title: Making xampp and node(socket.io) work together
body: <p>I have a little web app which applies some AngularJS and php for some functions and some queries from the database(xampp's Apache and mySQL). Now I want to apply to a simple chat in the web app and I do not know how to configure nor what ports and so on. </p>
  
  <p>Following something similar to <a href="http://socket.io/get-started/chat/" rel="nofollow">http://socket.io/get-started/chat/</a></p>
  
  <p>I have index.js  as such</p>
  
  <pre><code>var app = require('express')();
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  
  app.get('/', function(req, res){
     res.sendFile(__dirname + '/index.html');
  
  });
  
  io.on('connection', function(socket){
     console.log('a user connected');
     socket.on('disconnect', function(){
     console.log('user disconnected');
     });
  });
  
  
  http.listen(443, function(){
    console.log('listening on *:443');
  });
  </code></pre>
  
  <p>I am trying port 443 and 80, but they doesnt seem to work (xampp shows 80 and 443, no idea how ports work) </p>
  
  <p>my JS file then has  <code>var socket = io();</code></p>
  
  <p>In my browser console , I'm getting something like </p>
  
  <pre><code>socket.io-1.2.0.js:2 GET http://localhost/socket.io/?IO=3&amp;transport=polling&amp;t=1465649664392-0 404 (Not Found)
  </code></pre>
  
  <p>How do I resolve this problem? I am expecting output such as <code>a user connected</code> in the cmd after running <code>node index.js</code> but I do not.</p>
  
  <p>I followed the example for the chat, and it works fine without xampp.</p>