title: Running node.js on a website but not on localhost
body: <p>I made an online multiplayer game. I works perfectly when I run it with node.js command prompt on localhost:3000. But when I try to run it on the website it is not doing what my app.js file says it to do.  my questions are;</p>
  
  <p>How can I make my node.js project run on my website rather than on localhost? 
  What will the port be instead of 3000?
  Can I do this by uploading some file into my website via ftp?</p>
  
  <p>Here is my app.js file</p>
  
  <pre><code>var express = require('express'),
  app = express(),
  server = require('http').createServer(app),
  io = require('socket.io').listen(server);
  
  var usernumm = 0;
  var usernum1 = [];
  
  app.use(express.static(__dirname + '/public'));
  
  server.listen(3000);
  
  app.get('/', function(req, res){
  res.sendfile(__dirname + '/index.html');
  });
  
  io.sockets.on('connection', function(socket){
  
  
  var endpoint = socket.manager.handshaken[socket.id].address;
  console.log('***New connection from ' + endpoint.address + ':' +     endpoint.port);
  
  usernumm++;
  io.sockets.emit('usernum', usernumm);
  usernum1[usernumm] =  endpoint.port;
  console.log('usernum'+usernumm+'geldi'+findusernum());
  
  
  socket.on('button1socket', function(){
  
      io.sockets.emit('button1f', findusernum() );
      console.log('user '+findusernum()+' pressed a button');
  
  });
  socket.on('buttonclickable', function(){
  
      io.sockets.emit('buttonclickable1', findusernum() );
  
  });
  
  socket.on('disconnect', function () {
      usernumm--;
      io.sockets.emit('usernum', usernumm);
      //sockets[usernum] = socket.port;
      console.log('***Client disconnected');
  });
  
  
  //finds number of online users
  function findusernum(){
      for(var i = 0; i&lt;9;i++){
          if(usernum1[i] == endpoint.port){return i;}else{}
          }
  }
  
  
  });
  </code></pre>