1 00:00:00,450 --> 00:00:07,700 At this point, they start going to create a import such that the USA can send a message to the server, 2 00:00:08,370 --> 00:00:17,040 so first we are going to come inside and go to the chat page and we are going to use the U.S. state. 3 00:00:17,040 --> 00:00:26,520 So we have to import the USA from we add, and then we are going to create a message. 4 00:00:28,530 --> 00:00:33,270 And that message is equal to the U.S. state. 5 00:00:35,250 --> 00:00:39,230 And an empty string we sent that in is old value is empty. 6 00:00:40,760 --> 00:00:43,610 And then we are going to create a send message functions. 7 00:00:47,320 --> 00:00:49,510 First, we are going to prevent a answer and. 8 00:00:50,740 --> 00:00:56,160 Just refreshed the page when we passed the sand message button. 9 00:00:57,400 --> 00:01:06,760 And we are going to check if this message is empty, so a message and we are going to a lot the message 10 00:01:06,760 --> 00:01:14,050 that we typed in the console and we are going to commit this to the server. 11 00:01:14,620 --> 00:01:16,920 So we use soccer emit. 12 00:01:21,130 --> 00:01:26,950 And the named this event as their message, and then we passed a message. 13 00:01:28,000 --> 00:01:30,580 And also the comedy. 14 00:01:32,430 --> 00:01:40,470 And then after we passed these two values, we are going to kind of matter. 15 00:01:40,920 --> 00:01:42,900 So we use that message. 16 00:01:45,410 --> 00:01:46,760 To be the empty string. 17 00:01:49,190 --> 00:01:55,890 And if you remember, if you go to the chat and then you can click on the logo and back to the homepage. 18 00:01:56,240 --> 00:01:57,890 So we do not need this. 19 00:01:58,610 --> 00:02:06,650 So we do not need to go to the home button and then we can delete this one and we create a form. 20 00:02:07,640 --> 00:02:18,800 And then we create an input field and the value we produce to the message and on change is DeCota that 21 00:02:18,800 --> 00:02:26,650 you went and we you and talk untaught talk value. 22 00:02:27,200 --> 00:02:38,300 And then on key press, we will also give the U.N. key equal to enter and we will send a message, otherwise 23 00:02:38,390 --> 00:02:39,260 we will do nothing. 24 00:02:39,500 --> 00:02:44,720 So alas, we have to add on some meat to trigger the same message functions. 25 00:02:45,950 --> 00:02:50,450 So we used to own stock, which is equal to the same message. 26 00:02:50,780 --> 00:02:56,690 And before the end of the fall, we create a button and send message. 27 00:02:57,080 --> 00:02:59,930 So now we can go to the website and take a try. 28 00:03:01,690 --> 00:03:08,980 Now, this area is because we have installed our server so we can ignore this and then we try something, 29 00:03:09,220 --> 00:03:16,660 now you can send a message to the console and decided, OK, here, as we expected, because we haven't 30 00:03:17,260 --> 00:03:18,820 received it at the surface outside. 31 00:03:19,030 --> 00:03:27,760 So, you know, check these coalbed, but you already can show that this function already work for sending 32 00:03:27,760 --> 00:03:28,330 the message.