In this section, we'll create a Tiny Server from scratch. We'll start with the necessary dependencies, declare a main function, and then try to build and run it.
Binding a Tiny Server
Adding necessary dependencies
First, we need to create a new folder where we'll add the necessary dependencies to create our first microservice. Use cargo to make a new project called hyper-microservice:
> cargo new hyper-microservice
Open the created folder and add dependencies to your Cargo.toml file:
[dependencies]
hyper = "0.12"
The single dependency is the hyper crate. The latest release of this crate is asynchronous and lies on top of the futures crate. It also uses the tokio crate for runtime,...