January 2019
Intermediate to advanced
520 pages
14h 32m
English
If you remember, we created the router microservice in Chapter 11, Involving Concurrency with Actors and the Actix Crate, where we explored features of the Actix framework. We adapted the router microservice to work with other microservices—we added a Config and a State that share configuration values with handlers. Also, the improved router microservice serves assets that are in the static folder. We also have to copy this folder to an image. Look at the Dockerfile of the router microservice:
FROM rust:1.30.1RUN USER=root cargo new --bin router-microserviceWORKDIR /router-microserviceCOPY ./Cargo.toml ./Cargo.tomlRUN cargo buildRUN rm src/*.rsCOPY ./src ./srcCOPY ./static ./staticRUN rm ./target/debug/deps/router_microservice* ...
Read now
Unlock full access