showing results for - "exemplo simples de socket com node"
David
05 Jul 2017
1<html>
2<head></head>
3
4<body>
5  <div id="message"></div>
6
7  <script src="/socket.io/socket.io.js"></script>
8  <script>
9    var socket = io();
10
11    socket.on('message', function(msg){
12      console.log(msg);
13      document.getElementById("message").innerHTML = msg;
14    });
15  </script>
16</body>
17</html>