diff --git a/client/garageserver.io.js b/client/garageserver.io.js index 73e0997..e58769e 100644 --- a/client/garageserver.io.js +++ b/client/garageserver.io.js @@ -181,6 +181,9 @@ var GarageServerIO = (function (socketio) { initializeGarageServer = function (path, options) { _options = options; + if(path == null || path.length <= 0) { + throw new Error('GarageServer.IO client is missing the server path - please verify the path argument passed to GarageServerIO.initializeGarageServer.'); + } _socket = _io.connect(path + '/garageserver.io'); registerSocketEvents(); }, diff --git a/example/public/javascripts/game.js b/example/public/javascripts/game.js index ffa4a22..151883c 100644 --- a/example/public/javascripts/game.js +++ b/example/public/javascripts/game.js @@ -7,7 +7,7 @@ $(function () { window.addEventListener('resize', resizeCanvas, false); - GarageServerIO.initializeGarageServer('https://garageserver_io-c9-jbillmann.c9.io', { + GarageServerIO.initializeGarageServer('', { logging: true, onReady: startGame, onUpdatePlayerPrediction: GamePhysics.getNewPlayerState,