current run socketIO

This commit is contained in:
derlole
2025-04-17 05:15:10 +00:00
parent 9aaf4960c6
commit 58f9d3b451
3 changed files with 70 additions and 28 deletions

View File

@@ -11,15 +11,18 @@
<p><strong>Status:</strong> <span id="status"></span></p>
<p><strong>Counter:</strong> <span id="counter"></span></p>
<script src="https://cdn.socket.io/4.6.1/socket.io.min.js"></script>
<script>
const socket = io();
socket.on('update_data', (data) => {
document.getElementById('test').textContent = data.test;
document.getElementById('status').textContent = data.status;
document.getElementById('counter').textContent = data.counter;
console.log('Neue Daten:', data);
});
</script>
</body>
</html>
</body>
</html>