Answers for "exemplo simples de socket com node"

0

exemplo simples de socket com node

<html>
<head></head>

<body>
  <div id="message"></div>

  <script src="/socket.io/socket.io.js"></script>
  <script>
    var socket = io();

    socket.on('message', function(msg){
      console.log(msg);
      document.getElementById("message").innerHTML = msg;
    });
  </script>
</body>
</html>
Posted by: Guest on April-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language