summaryrefslogtreecommitdiffstats
path: root/socket.io/public
diff options
context:
space:
mode:
Diffstat (limited to 'socket.io/public')
-rw-r--r--socket.io/public/index.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/socket.io/public/index.html b/socket.io/public/index.html
new file mode 100644
index 0000000..e8b4cf7
--- /dev/null
+++ b/socket.io/public/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>socket.io</title>
+ <script src="/socket.io/socket.io.js"></script>
+ <script>
+ var socket = io.connect('http://localhost:8081');
+ socket.on('news', function (msg) {
+ console.log(msg);
+ socket.emit('my other event', msg + ' back');
+ });
+ </script>
+</head>
+ <body>
+ <p>hello socket.io.</p>
+ </body>
+</html>