humus-old/server/index.js

11 lines
350 B
JavaScript
Raw Normal View History

2019-03-20 15:28:18 -05:00
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);
2019-04-03 17:34:15 -05:00
const connectionListener = createGame();
avocadoServer.on('connect', connectionListener);