Last active
August 13, 2018 11:02
-
-
Save shierro/ecaa647e6315bfa8c1b14218474f4195 to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<h1>Test</h1> | |
<script src="https://calm-brushlands-46230.herokuapp.com/octagon/socket.io/socket.io.js"></script> | |
<script> | |
// var socket = io.connect('//calm-brushlands-46230.herokuapp.com', { rejectUnauthorized: false }); | |
var socket = io('https://calm-brushlands-46230.herokuapp.com', | |
// var socket = io('//localhost:5000', | |
{ | |
reconnect: true, | |
rejectUnauthorized: false, | |
transports : ['websocket'], | |
path: '/octagon/socket.io' | |
}); | |
socket.on('news', function (data) { | |
console.log(data); | |
socket.on('connection', function () { | |
alert('Browser is connected to server!'); | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment