Simple 2D HTML Canvas game in JavaScript
<script src="http://<YOUR_IP>:3000/socket.io/socket.io.js"></script>
static connectToServer(io)
{
Game.socket = io.connect('http://<YOUR_IP>:3000');
Game.socket.on('connect',function()
{
player.id = Game.socket.id;
console.log(Game.socket.id);
Game.reportNewLogin();
});
}
You should install all of dependencies using by npm install
command.