summaryrefslogtreecommitdiff
path: root/test/index.html
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-16 22:01:19 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-16 22:01:19 (GMT)
commit7d801dc90d02a70d6d70f541bdfe20901bbe673b (patch)
treeb5511740eacf0354f5642dcd11bf670ae0292046 /test/index.html
parenta25ecb83c72519ad6087a921910b833b3aff687b (diff)
added a simple websocket testclient
Diffstat (limited to 'test/index.html')
-rw-r--r--test/index.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/index.html b/test/index.html
new file mode 100644
index 0000000..41d0a3a
--- /dev/null
+++ b/test/index.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <title>rhrdtime - Testclient</title>
+ <style type="text/css">
+ body {
+ background-color: #555;
+ }
+
+ #timedata {
+ background-color: white;
+ border: 1px solid;
+ padding: 1em;
+ font-family: monospace;
+ }
+ </style>
+ <script src="jquery.min.js"></script>
+ <script type="text/javascript">
+ function init() {
+ var sock = new WebSocket("ws://localhost:3000/time");
+
+ sock.onmessage = function (event) {
+ $('#timedata').text(event.data);
+ }
+ }
+ </script>
+ </head>
+ <body onload="init()">
+
+ <h1>Radio Helsinki Rivendell Time:</h1>
+
+ <div id="timedata"></div>
+
+ </body>
+</html>