From 961ab22a78a15ae09a2e3adc02f4729633af9cd0 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Mon, 13 Mar 2017 13:43:44 +0100 Subject: [PATCH] additional js file for frontend js code --- public/js/front_client.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 public/js/front_client.js diff --git a/public/js/front_client.js b/public/js/front_client.js new file mode 100644 index 0000000..737639f --- /dev/null +++ b/public/js/front_client.js @@ -0,0 +1,13 @@ +'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);