Since we have everything in place with MongoDB, it is time to start the application and run some tests manually. We will do so using the following steps:
- To start the application, run the following command:
$ npm run dev
- Go to the POSTman application and create a new user:
POST operation to create a new user
- Now, try to retrieve it using the GET operation:
Retrieving the user through the GET method
- Try to create more users and then create orders for them all:
Creating orders using the POST operation for the new users created
- Finally, call the URI. inventory :
Orders inventory
- To make sure the documents are stored on MongoDB, check them using the Robomongo client. Users will be shown the following:
Users created and stored on MongoDB
The orders will be shown as follows:
Orders created with the new users and stored on MongoDB
As we can see from...