Created
June 27, 2016 17:44
-
-
Save johnSerrano/c0eb75b8f375f03cff14d1149fce98cb to your computer and use it in GitHub Desktop.
test for socket
This file contains 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); | |
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