Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (20 sloc) 410 Bytes
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Socket.io test</title>
</head>
<body>
<h1>Socket.io Chat</h1>
<script src="/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:8080');
socket.on('connect', function () {
socket.send('hello world');
socket.on('message', function (msg) {
console.log("message:" + msg);
});
});
</script>
</body>
</html>