current run socketIO
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user