Checking the standalone backend
There are a number of options when it comes to selecting tools to check backend APIs, ranging from the command-line tool curl (https://github.com/curl/curl) to Advanced REST Client (https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo)—a Chrome extension app with an interactive user interface.
To check the APIs implemented in this chapter, first have the server running from the command line, and use either of these tools to request the routes. If you are running the code on your local machine, the root URL is http://localhost:3000/
.
Using ARC, we will showcase the expected behavior for five use cases of checking the implemented API endpoints.
Creating a new user
First, we will create a new user with the /api/users
POST request, and pass name, email, and password values in the request body. When the user is successfully created in the database without any validation errors, we will see a 200 OK
success message as shown...