168
CHAPTER 5 | Designing and Developing Multi-Container and Microservice-Based .NET Applications
Figure 6-31. Testing the Catalog microservice with its Swagger UI
At this point, you could set a breakpoint in C# code in Visual Studio, test the microservice with the
methods exposed in Swagger UI, and finally clean-up everything with the
docker-compose down
command.
However, direct-access communication to the microservice, in this case through the external port
5101, is precisely what you want to avoid in your application. And you can avoid that by setting the
additional level of indirection of the API Gateway (Ocelot
, in this case). That way, the client app won’t
directly access the microservice.
Dostları ilə paylaş: