io.connect changed

//var socket = io.connect('http://localhost');
var socket = io.connect(window.location.hostname);