How it works...

If you start the server, accessing the /api-docs route will provide access to the main Swagger screen, as follows:

 Swagger produces a main page, with access to every route you defined

Interaction is easy: select an area, click on a given request, and you'll get the list of all routes and operations. Let's see, for example, how to get the regions for Uruguay. First, we must get a token, so we want to open the token area and enter the necessary user and password, as shown in the following screenshot:

 Doing a request is just ...

Get Modern JavaScript Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.