Created
June 27, 2016 21:55
-
-
Save johnSerrano/77d054b29478d4243d91b98fd4d9a16a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> | |
| <script> | |
| $(document).ready(function() { | |
| var socket = io.connect('http://' + document.domain + ':' + location.port); | |
| socket.on("loaded", function() { | |
| console.log("loaded adsfadsfasdfadf"); | |
| }); | |
| socket.on("done", function(msg) { | |
| console.log(msg); | |
| }); | |
| var hello = {"id": "asDFasDF12", "word_1": "Flask", "word_2": "Sockets", } | |
| socket.emit("hello", hello); | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| <div>Hello</div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment