not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
437 B

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Hello world</title>
  5. </head>
  6. <script src = "https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
  7. <script>
  8. var socket = io('127.0.0.1:3000');
  9. socket.emit('register', 'jeffery');
  10. console.log(socket);
  11. socket.on('sendRooms',function(data) {
  12. document.body.innerHTML = '';
  13. document.write(data);
  14. });
  15. </script>
  16. <body>Hello world</body>
  17. </html>