Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import io from '';
const socket = io('http://localhost:3002');
socket.on('connect', () => { console.log('connected') });
socket.on('newBet', function(newBet) {
const { id, name, avatar, bet, choice } = newBet;
const player = new Player(id, name, avatar);
store.dispatch('placeBet', { player, bet, choice });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment