|
@@ -0,0 +1,43 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<!-- saved from url=(0025)http://192.168.1.20:5000/ -->
|
|
|
+<!-- socket.on('msg', msg => console.log(msg)) -->
|
|
|
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
+ <title>
|
|
|
+ Static File Index.HTML
|
|
|
+ </title>
|
|
|
+ <script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js'></script>
|
|
|
+ <style>
|
|
|
+ input {
|
|
|
+ width: 200px;
|
|
|
+ height: 40px;
|
|
|
+ }
|
|
|
+ button {
|
|
|
+ width: 150px;
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
+ .wrapA {
|
|
|
+ width: 100%;
|
|
|
+ height: 600px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+ <div id="formContainer">
|
|
|
+ <div class="wrapA">
|
|
|
+ <div>
|
|
|
+ <h1 id='out'></h1>
|
|
|
+ <input type="text" id="nick">
|
|
|
+ <input type="text" id="message">
|
|
|
+ <button id="send">ЖМИ</button>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ const socket = io('http://localhost:4000');
|
|
|
+
|
|
|
+ send.onclick = () => socket.emit('msg', {nick: nick.value, message: message.value});
|
|
|
+ </script>
|
|
|
+
|
|
|
+
|
|
|
+</body></html>
|