If you don't have JDK or Maven installed in your environment yet, you may want to install it now by following their respective installation instructions. We need Maven installed on our machines, and we can run the program with IDEs as well. The following instructions cover how to run these samples with Windows command-line, along with the maven command line.
If you need Maven installation instructions, please follow the link and steps defined in the installation document. The Maven installation guide is available at https://maven.apache.org/install.html.
The following section provides instructions on how to run the examples of this chapter, along with screenshots that the author was able to set up and run in his Windows-based laptop:
- Download the build script from Hands-On-RESTful-API-Design-Patterns-and-Best-Practices/scripts/buildMyExamples.bat.
- Run the downloaded buildMyExample.bat script in your Windows Command Prompt and observe your output, which should be similar to what you can see in the following screenshot:
- Download the run script from Hands-On-RESTful-API-Design-Patterns-and-Best-Practices/scripts/runMyExamples.bat. Observe the following screenshot and match it with your Windows command-line output:
- Once your local server has started, you can download the sample Postman collections for this book from the following GitHub link: https://github.com/PacktPublishing/Hands-On-RESTful-API-Design-Patterns-and-Best-Practices/blob/master/scripts/book-examples.postman_collection.json. Import the collection to your local Postman tool, then run the mentioned examples in this chapter and witness the results in your Postman as you see in the following screenshot:
If you need help on installing Postman, you may find this link useful: https://learning.getpostman.com/docs/postman/launching_postman/installation_and_updates/. If you need help importing the Postman collections to your local Postman installation, you may find this link useful: https://learning.getpostman.com/docs/postman/collections/data_formats/#exporting-and-importing-postman-data.