This commit is contained in:
Xamora
2023-11-23 17:40:10 +01:00
parent 267eeab896
commit b33209f6c0
18 changed files with 109 additions and 35 deletions

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Chat</title>
</head>
<body>
<h1>Chat</h1>
<script type="text/javascript">
let url = `ws://${window.location.host}/ws/socket-server/`
const chatSocket = new WebSocket(url)
chatSocket.onmessage = function(e) {
let data = JSON.parse(e.data)
console.log('Data:', data)
}
</script>
</body>
</html>