1 00:00:00,180 --> 00:00:07,500 In this part, we are going to do the possibly such that the user can post a few items and we already 2 00:00:07,500 --> 00:00:12,060 have that page of items and there is a form here. 3 00:00:13,080 --> 00:00:18,360 But there is something that we need to add in order to make the post work. 4 00:00:19,320 --> 00:00:28,020 And for us here at the forum, we have to add the astronauts and we are going to go to the items and 5 00:00:28,020 --> 00:00:33,210 point and we are going to use the method of post. 6 00:00:33,540 --> 00:00:38,190 And we also already map this as name this input for you. 7 00:00:38,190 --> 00:00:39,330 And the other is the. 8 00:00:39,840 --> 00:00:44,760 So later we can use this to get the value of these input for. 9 00:00:45,300 --> 00:00:47,290 Now we go to the airport. 10 00:00:47,370 --> 00:00:47,790 Yes. 11 00:00:49,390 --> 00:01:00,230 And here we at the Post and don't we go to the items and which is the same as the ations here. 12 00:01:00,850 --> 00:01:05,560 Now we go to the put a request and response here. 13 00:01:05,920 --> 00:01:09,700 But first we have to add the express bit where. 14 00:01:10,800 --> 00:01:16,290 And underneath the app, we use Apple Juice 15 00:01:18,990 --> 00:01:19,710 Express. 16 00:01:22,790 --> 00:01:32,350 Thought you out and called me Posti extend is equal to truth, and this is the middle where functions 17 00:01:32,350 --> 00:01:39,450 in Express and it passes the incoming request with you out and coat the pillows. 18 00:01:39,460 --> 00:01:42,250 And this is based on the body posture. 19 00:01:42,910 --> 00:01:45,990 So now we can try to control a lot. 20 00:01:46,240 --> 00:01:47,950 We cross the body. 21 00:01:48,740 --> 00:01:55,940 So here we type Ponsoldt, don't we start all day and see what happens. 22 00:01:56,200 --> 00:02:06,730 Now we go to items and if we type some item here and press that item, now you can see there is an object, 23 00:02:07,090 --> 00:02:12,210 an apple and price is equal to this number. 24 00:02:12,550 --> 00:02:22,000 And if we commend this to where and now we try again and press at items and identified and you will 25 00:02:22,000 --> 00:02:26,830 also see that is some JavaScript problem here and we will fix this later. 26 00:02:27,160 --> 00:02:32,620 Now, we came back to the post a week after we already got the items. 27 00:02:32,630 --> 00:02:38,020 We are going to create the items we're using, the model. 28 00:02:38,230 --> 00:02:45,250 And we passed a request of body here because this is the same as the model. 29 00:02:45,250 --> 00:02:47,200 We need the name and also the price. 30 00:02:47,740 --> 00:02:52,270 And it already gave us these two properties. 31 00:02:52,600 --> 00:02:54,900 And first, we need to Untermensch this. 32 00:02:55,630 --> 00:02:57,430 How could we create a new item? 33 00:02:57,460 --> 00:03:00,290 We can use item to save and change. 34 00:03:00,310 --> 00:03:03,040 This is a space we can use of that. 35 00:03:03,490 --> 00:03:09,820 And then after it already saved, we want to be direct with the home page and purchase the items. 36 00:03:11,450 --> 00:03:12,310 And then, doctor. 37 00:03:14,300 --> 00:03:21,590 So now we try to add items again, we try to add the phone and the price is one thousand and then we 38 00:03:21,590 --> 00:03:27,800 add items and we should go to the path of get items rather than items. 39 00:03:28,220 --> 00:03:30,130 We should redirect to get items. 40 00:03:30,680 --> 00:03:32,870 So we we pay stays and it's safe again. 41 00:03:33,350 --> 00:03:35,780 We can try to delete the whole collections. 42 00:03:38,190 --> 00:03:44,990 And then we add items and then add full and one thousand and then press items. 43 00:03:45,240 --> 00:03:51,960 Now you can see it, half the phone with one thousand dollars is added to the page. 44 00:03:52,020 --> 00:03:59,730 And if you go to the local TV and passably fresh, you can also see the foam is stored here. 45 00:04:00,240 --> 00:04:07,700 Now we add another other items, for example, computer and we paste Widdowson and then we add items 46 00:04:08,070 --> 00:04:15,510 now also show in the homepage and also stored it inside the Mongo DB.