1 00:00:05,640 --> 00:00:12,210 In the past year, we already create this form and there's a button for summing up to account, but 2 00:00:12,210 --> 00:00:20,920 now these functions just can pop up the name, email and password, but not actually set up a new account. 3 00:00:21,090 --> 00:00:24,710 So now we are going to add these functions to our project. 4 00:00:24,960 --> 00:00:31,130 So we back to our current site and go to the site a page and go to the handle our functions. 5 00:00:31,560 --> 00:00:34,520 We are going to use the post. 6 00:00:34,530 --> 00:00:34,680 We. 7 00:00:35,370 --> 00:00:38,250 So we are going to make a try catch block first. 8 00:00:38,400 --> 00:00:43,350 And we need to change these two key thing because we are going to use a weight. 9 00:00:43,350 --> 00:00:48,650 So constant response is equal to a weight and fat. 10 00:00:48,900 --> 00:00:56,290 And if you remember our of about each to sign up and our port is 5000. 11 00:00:56,460 --> 00:01:06,100 So if you go back to our current side, you have to go to localhost five thousand and then side up and 12 00:01:06,100 --> 00:01:08,310 then we are going to add the options here. 13 00:01:08,940 --> 00:01:14,970 You used a method post because if you do not mention this, the default mission is get. 14 00:01:15,660 --> 00:01:25,740 And what we are going to send is Jason, bring the and then we post a name, email and password and 15 00:01:25,830 --> 00:01:35,820 then Jaiswal object and we have to put the header, the content type application back on 16 00:01:38,610 --> 00:01:41,070 and we put the era of this era. 17 00:01:41,310 --> 00:01:47,030 So now we can go back to our project and then we go to a site up. 18 00:01:47,280 --> 00:01:49,740 Now you can see we are unable to fetch this. 19 00:01:49,740 --> 00:01:53,400 We crashed because there's a cross origin program. 20 00:01:53,400 --> 00:01:59,120 So to fix the we can pop them, we have to make that relaxations of the same origin policy. 21 00:01:59,370 --> 00:02:05,940 So we have to use some Hadass that defines cost of origin and associated properties. 22 00:02:06,210 --> 00:02:11,190 So now we need to go back to the server and we go to the index of the server. 23 00:02:11,340 --> 00:02:20,940 So first we stopped a server and then we are going to install Prepackage code course. 24 00:02:21,390 --> 00:02:29,820 And then on the top we are going to add the cornerstone code is equal to require code and then we are 25 00:02:29,820 --> 00:02:34,110 going to create a code Opteron is equal to in the original. 26 00:02:34,770 --> 00:02:39,420 And when you look at the browser, we are going to use the localhost three thousand port. 27 00:02:39,840 --> 00:02:51,540 So we paste here and then we had the credential is true and the options assess status is 200. 28 00:02:51,870 --> 00:02:58,670 So right before all the other things we go to you this package by using apple juice course and then 29 00:02:58,680 --> 00:03:01,580 we pass these options into this package. 30 00:03:01,950 --> 00:03:05,250 Now we save this and then we go to sign up again. 31 00:03:05,460 --> 00:03:10,440 The connection we felstead because we forgot to start the server. 32 00:03:11,370 --> 00:03:19,350 So we go to the command and then we type the launch in that at last we are going to try to fix this 33 00:03:19,350 --> 00:03:28,800 problem because we use the capital letter and then we are going to display the data by using colistin 34 00:03:28,800 --> 00:03:33,510 data yaeko to always respond to on. 35 00:03:34,170 --> 00:03:38,140 And then we are going to a console, not the data. 36 00:03:38,340 --> 00:03:48,990 Now if we go to the Web site and then we try again with Ellan two and Ellen two at Gmail dot com and 37 00:03:48,990 --> 00:03:50,040 then click sign up. 38 00:03:50,040 --> 00:03:58,200 Now you can see it pop up the data because at the off controller we are going to pop up the user if 39 00:03:58,200 --> 00:04:02,520 we create a user successfully while if we go to a site up again. 40 00:04:03,430 --> 00:04:10,840 It will display the aircraft because this time it will pop up this email already registered if this 41 00:04:10,840 --> 00:04:19,000 era where we returned to object and now if we go to the Mongo DB, you can see Eventa already created.