In the past year, we already create this form and there's a button for summing up to account, but
now these functions just can pop up the name, email and password, but not actually set up a new account.
So now we are going to add these functions to our project.
So we back to our current site and go to the site a page and go to the handle our functions.
We are going to use the post.
We.
So we are going to make a try catch block first.
And we need to change these two key thing because we are going to use a weight.
So constant response is equal to a weight and fat.
And if you remember our of about each to sign up and our port is 5000.
So if you go back to our current side, you have to go to localhost five thousand and then side up and
then we are going to add the options here.
You used a method post because if you do not mention this, the default mission is get.
And what we are going to send is Jason, bring the and then we post a name, email and password and
then Jaiswal object and we have to put the header, the content type application back on
and we put the era of this era.
So now we can go back to our project and then we go to a site up.
Now you can see we are unable to fetch this.
We crashed because there's a cross origin program.
So to fix the we can pop them, we have to make that relaxations of the same origin policy.
So we have to use some Hadass that defines cost of origin and associated properties.
So now we need to go back to the server and we go to the index of the server.
So first we stopped a server and then we are going to install Prepackage code course.
And then on the top we are going to add the cornerstone code is equal to require code and then we are
going to create a code Opteron is equal to in the original.
And when you look at the browser, we are going to use the localhost three thousand port.
So we paste here and then we had the credential is true and the options assess status is 200.
So right before all the other things we go to you this package by using apple juice course and then
we pass these options into this package.
Now we save this and then we go to sign up again.
The connection we felstead because we forgot to start the server.
So we go to the command and then we type the launch in that at last we are going to try to fix this
problem because we use the capital letter and then we are going to display the data by using colistin
data yaeko to always respond to on.
And then we are going to a console, not the data.
Now if we go to the Web site and then we try again with Ellan two and Ellen two at Gmail dot com and
then click sign up.
Now you can see it pop up the data because at the off controller we are going to pop up the user if
we create a user successfully while if we go to a site up again.
It will display the aircraft because this time it will pop up this email already registered if this
era where we returned to object and now if we go to the Mongo DB, you can see Eventa already created.