Added splashscreen
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
let wss = "ws://" + window.location.hostname + ":3001" // Build socketio endpoint from window.location
|
||||
const socket = io(wss); // Connect to socketio server
|
||||
|
||||
// ######################################################################################################################################################
|
||||
// Websockets event handler
|
||||
// ######################################################################################################################################################
|
||||
|
||||
socket.on('connected', (message) => {
|
||||
console.log("Connected");
|
||||
});
|
||||
|
||||
socket.on('refresh', (message) => {
|
||||
document.location.reload() // Reload page on received 'refresh' messagen
|
||||
});
|
||||
Reference in New Issue
Block a user