diff options
author | Kyle K <kylek389@gmail.com> | 2012-08-13 00:30:17 -0500 |
---|---|---|
committer | Kyle Kaminski <kyle@kkaminsk.com> | 2012-08-13 00:30:17 -0500 |
commit | 60909c1b129238b276d8cf53650f5fac64052013 (patch) | |
tree | 2915f62eeff0634873c03e987dfe8b627f1c6cf8 /socket.io/public | |
parent | 6f35b1b30591783d53be11d17c3938971ec50fd4 (diff) | |
download | fubar-60909c1b129238b276d8cf53650f5fac64052013.tar.gz fubar-60909c1b129238b276d8cf53650f5fac64052013.tar.bz2 fubar-60909c1b129238b276d8cf53650f5fac64052013.zip |
begin socket.io journey
Diffstat (limited to 'socket.io/public')
-rw-r--r-- | socket.io/public/index.html | 17 |
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> |