14 lines
267 B
JavaScript
14 lines
267 B
JavaScript
|
'use strict';
|
||
|
//import io from('/socket.io/socket.io.js');
|
||
|
let io = require('socket.io-client')
|
||
|
let iosocket = io.connect();
|
||
|
|
||
|
// setup all my handlers
|
||
|
iosocket.on('clientrefresh', () => {
|
||
|
location.reload();
|
||
|
});
|
||
|
|
||
|
|
||
|
// get my state
|
||
|
iosocket.emit('loadState',context);
|