Summary

In this chapter, we created a microservice using a hyper crate. We started with a minimal example that only responds with the Rust Microservice message. Then, we created a microservice that has two distinct paths  the first being the index page request and the second, the NOT_FOUND response.

Once we learned the basics, we then started to use the match expression to make the microservice REST-compliant. We also added the ability to handle users' data with four basic operations—create, read, update, and delete.

To expand the routing capabilities in the last example of the chapter, we implemented routing based on regular expressions. Regular expressions are compact patterns that check and extract data from a text.

In this chapter, we encountered various crates—hyper, futures, slab, regex, and lazy_static. We'll discuss these in detail in the next chapter. 

Since we have learned to create minimal HTTP microservice in the next chapter we will learn how to make it configurable and how to attach logging to it, because microservices work at remote servers and we need a capability to configure it without recompilation and be able to see all issues that happened with a microservices in logs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.20.68