You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
328 B
8 lines
328 B
2 months ago
|
// const ws = new WebSocket("ws://localhost:7781/ws");
|
||
|
const ws = new WebSocket("ws://192.168.0.100:7781/ws");
|
||
|
ws.onmessage = function(event) {
|
||
|
const messages = document.getElementById('messages');
|
||
|
const message = document.createElement('div');
|
||
|
message.textContent = event.data;
|
||
|
messages.appendChild(message);
|
||
|
};
|