diff --git a/server/index.js b/server/index.js index 57a21e8..bd237fb 100644 --- a/server/index.js +++ b/server/index.js @@ -4,7 +4,7 @@ import {Server} from '@avocado/server/socket'; import '../register-traits'; // Start game server. import Game from './game'; -const avocadoServer = new Server(); +const socketServer = new Server(); let game; let httpServer; @@ -14,14 +14,14 @@ function createGame() { // Listen for connections. httpServer = http.createServer(); httpServer.listen(8420, '0.0.0.0'); - avocadoServer.on('connect', game.acceptConnection, game); - avocadoServer.open(httpServer); + socketServer.on('connect', game.acceptConnection, game); + socketServer.open(httpServer); } function destroyGame(fn) { // Stop listening. - avocadoServer.off('connect', game.acceptConnection); - avocadoServer.close(() => { + socketServer.off('connect', game.acceptConnection); + socketServer.close(() => { httpServer.close(() => { game.destroy(fn); })