wip
This commit is contained in:
29
shell/watcher.html
Normal file
29
shell/watcher.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>WebSocket Test</title>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Replace 'ws://localhost/ws' with your WebSocket server address
|
||||
var ws = new WebSocket('ws://localhost/ws');
|
||||
|
||||
ws.onopen = function() {
|
||||
console.log('WebSocket connection established');
|
||||
};
|
||||
|
||||
ws.onmessage = function(event) {
|
||||
console.log('Message received: ' + event.data);
|
||||
};
|
||||
|
||||
ws.onclose = function() {
|
||||
console.log('WebSocket connection closed');
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>WebSocket Test Page</h1>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user