We are going to demonstrate how to get the items and also the items to the Mongo DB, So first we are
going to apologize and right before that, we are going to create the item.
Mordo.
And we are going to import from the file that we just created.
For example, we are going to create a map together and.
Do you see it that's created by Tom.
And then we agree that we weren't and response.
And then we create a new item, so we set it as a constant item is equal to nude and use the model and
the name is Vogue and the price is one thousand.
We do not need to at the time because it will create automatically by the mongoose.
So after we create the item, we can use item to save.
And because this is POMA space, so we can use then and we can return the result, U.S. response to
find out.
So now we can try the path by using crate items.
Now you can see it already returns the response to the website.
So we can also check it inside Mongo DB.
You can see this is the item that we just created with the form and the price is one thousand and we
can create another item by changing these values.
And if we refresh now, you can see it already changed to computer and 2000s.
And now if you go to the mango deep and refresh again, you can see it now.
There are two items here.
One is the phone and the other is the computer.
Now, we can also get all the items.
I changed it as get items.
Now, we do not have to create a new item so we can delete this and we are going to change this to a
fight.
And both of them has to catch the error.
Now, we can copy this.
And go to the website and paste here, the item is not defined because we should use item the capital
letter.
And now we refresh again.
Now we can see the two documents here.
And you may not like this if you're using Chrome because using Firefox.
So both of them, you displayed these two items at last.
I'm going to demonstrate to get the items by using the IP so we change this item and then we change
this to a five by I.T. and then we have to pass the idea here.
Now we can copy one of them.
For example, we want to copy the IP of the phone and then we paste it here.
Now, if we go to get item now if you only to the phone and if we change this to the idea of the computer,
we pace it here and then we refresh you.
We've got the computer.