19 lines
321 B
JavaScript
19 lines
321 B
JavaScript
// @flow
|
|
'use strict';
|
|
// This is the backend client js
|
|
let iosocket: object = io.connect();
|
|
|
|
// setup all my handlers
|
|
iosocket.on('clientrefresh', () => {
|
|
location.reload();
|
|
});
|
|
|
|
iosocket.on('stateChange', () => {
|
|
|
|
location.reload();
|
|
});
|
|
|
|
// get my state
|
|
let context = 'admin';
|
|
iosocket.emit('loadState',context);
|