Generating users with Postman
Earlier in this chapter, we covered how to create a POST method to create a new user in the Services subsection of the Implementing APIs with Express.js section. Using this POST endpoint and the Postman API client, we can quickly generate user records for testing purposes.
You must generate test data in lemon-mart-server following the instructions below, which will be required in later chapters.
Let's install and configure Postman.
Go to https://www.getpostman.com to download and install Postman.
Configuring Postman for authenticated calls
First, we need to configure Postman so that we can access our authenticated endpoints:
Bring up your server and database using either docker-compose up
or npm run start:backend
. Remember, make sure that, first and foremost, you're able to execute the sample server provided on GitHub at https://github.com/duluca/lemon-mart-server. Getting your own version of...