diff --git a/index.ejs b/index.ejs new file mode 100644 index 0000000000000000000000000000000000000000..d46bf6cfa9e5255e92858e9af3d8b7a0c58b66ba --- /dev/null +++ b/index.ejs @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <title> Plants </title> + </head> + + <body> + <h1> Data </h1> + <p id="data"></p> + + <script src = "https://code.jquery.com/jquery-3.6.0.min.js"></script> + <script> + var socket = new WebSocket("ws://localhost:8000); + socket.onmessage = function(event){ + var data = event.data; + $("#data").text("Received: " + data); + }; + </script> + </body> +</html>