title: nodejs server doesn't handle requests when deployed remotely
body: <p>I have a node.js app (with websockets) that works locally. I ssh into my remote server, and run <code>node server.js</code> (the same thing I do locally). I get my logging text "connected and listening on (port) 3000". </p>
  
  <p>When running locally, I go to <code>https://localhost:3000</code>. for the remote server, I can't seem to find where the node server is handling requests. I've tried <code>https://mydomainroot.com:3000</code> and <code>https://mydomainroot/folder/containing/serverjs</code>, and some minor variations on that theme. </p>
  
  <p>None of these requests seem to be getting handled by my node server (it should log something like "received GET request to /main"). Sockets are also unresponsive.</p>
  
  <p>I'm using A Small Orange hosting, if that matters. </p>
  
  <p>I could just navigate directly to <code>main.html</code>, but it doesn't solve the websocket problem.</p>
  
  <p>My likeliest hunch is something to do with routing, but I've run out of ideas of where to look next. Help?</p>
  
  <p>code:</p>
  
  <pre><code>var path = require('path');
  var express = require('express');
  var app = express();
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  
  
  app.use(express.static(path.join(__dirname, 'public')));
  
  app.get('/', function(req, res){
    console.log("Received request for /");
    res.sendFile('main.html', {root: __dirname + '/public'});
  });
  
  io.on('connection', function(socket) {
    console.log("received socket connection");
    users.push(socket);
  
    socket.on('disconnect', function() {
      if (socket.player)
        var data = "updates"
  
        io.emit(data);
    });
  
    socket.on('move', function(move) {
        //send move to everyone except sender
        io.emit("updates");
      }
  
    });
  }); // socket connection ends
  
  function start() {
    http.listen(3000, function() {
      console.log("connected and listening on 3000");
      start();
  
    })
  };
  
  function start() {
  
    // this emits the game state to every connected socket
    io.emit('Initial state');
  
    // this triggers end of turn
    setTimeout(nextTick, 5000);
  
  }
  
  function nextTick() {
    io.emit('updates');
    start();
  }
  
  start();
  </code></pre>