humus-old/server/index.js
2019-04-03 18:34:15 -04:00

11 lines
350 B
JavaScript

import http from 'http';
import {Server} from '@avocado/server/socket';
const httpServer = http.createServer();
// Listen.
httpServer.listen(8420, '0.0.0.0');
// Start game server.
import createGame from './game';
const avocadoServer = new Server(httpServer);
const connectionListener = createGame();
avocadoServer.on('connect', connectionListener);