Change package /src/chesspp to just /chesspp
This commit is contained in:
40
chesspp/static_data/index.html
Normal file
40
chesspp/static_data/index.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>ChessPP</title>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.css"
|
||||
integrity="sha384-q94+BZtLrkL1/ohfjR8c6L+A6qzNH9R2hBLwyoAfu3i/WCvQjzL2RQJ3uNHDISdU"
|
||||
crossorigin="anonymous">
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/@chrisoakman/chessboardjs@1.0.0/dist/chessboard-1.0.0.min.js"
|
||||
integrity="sha384-8Vi8VHwn3vjQ9eUHUxex3JSN/NFqUg3QbPyX8kWyb93+8AC/pPWTzj+nHtbC5bxD"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="board1" style="width: 400px"></div>
|
||||
|
||||
<script>
|
||||
var board1 = Chessboard('board1', 'start')
|
||||
const socket = new WebSocket("ws://localhost:8080/ws");
|
||||
|
||||
socket.addEventListener("open", (event) => {
|
||||
socket.send("Hello Server!");
|
||||
});
|
||||
|
||||
socket.addEventListener("message", (event) => {
|
||||
board1.position(event.data)
|
||||
console.log("Message from server ", event.data);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user