In this part, we are going to do the possibly such that the user can post a few items and we already
have that page of items and there is a form here.
But there is something that we need to add in order to make the post work.
And for us here at the forum, we have to add the astronauts and we are going to go to the items and
point and we are going to use the method of post.
And we also already map this as name this input for you.
And the other is the.
So later we can use this to get the value of these input for.
Now we go to the airport.
Yes.
And here we at the Post and don't we go to the items and which is the same as the ations here.
Now we go to the put a request and response here.
But first we have to add the express bit where.
And underneath the app, we use Apple Juice
Express.
Thought you out and called me Posti extend is equal to truth, and this is the middle where functions
in Express and it passes the incoming request with you out and coat the pillows.
And this is based on the body posture.
So now we can try to control a lot.
We cross the body.
So here we type Ponsoldt, don't we start all day and see what happens.
Now we go to items and if we type some item here and press that item, now you can see there is an object,
an apple and price is equal to this number.
And if we commend this to where and now we try again and press at items and identified and you will
also see that is some JavaScript problem here and we will fix this later.
Now, we came back to the post a week after we already got the items.
We are going to create the items we're using, the model.
And we passed a request of body here because this is the same as the model.
We need the name and also the price.
And it already gave us these two properties.
And first, we need to Untermensch this.
How could we create a new item?
We can use item to save and change.
This is a space we can use of that.
And then after it already saved, we want to be direct with the home page and purchase the items.
And then, doctor.
So now we try to add items again, we try to add the phone and the price is one thousand and then we
add items and we should go to the path of get items rather than items.
We should redirect to get items.
So we we pay stays and it's safe again.
We can try to delete the whole collections.
And then we add items and then add full and one thousand and then press items.
Now you can see it, half the phone with one thousand dollars is added to the page.
And if you go to the local TV and passably fresh, you can also see the foam is stored here.
Now we add another other items, for example, computer and we paste Widdowson and then we add items
now also show in the homepage and also stored it inside the Mongo DB.