A simple web (REST) service built using the actix-web framework.
Note: This repository is an example project, please feel free to copy/fork/reuse anything within.
https://hub.docker.com/r/phantomnuker/actix-hello
cargo update
RUST_LOG='info,actix_hello=debug' cargo run -- ./config.toml
docker run \
--name=actix-hello \
-p 8080:8080 \
-e RUST_LOG='info,actix_hello=debug' \
-i -t \
--rm \
phantomnuker/actix-hello:muslrust-latest
docker build \
./ \
-f Muslrust.Dockerfile \
-t actix-hello:local
docker run \
--name=actix-hello \
-p 8080:8080 \
-e RUST_LOG='info,actix_hello=debug' \
-i -t \
--rm \
actix-hello:local
printf '%s\n' "$(curl -s http://localhost:8080/hi)"
output: Hi!
printf '%s\n' "$(curl -s http://localhost:8080/hello)"
output: Hello!
printf '%s\n' "$(curl -s http://localhost:8080/hello/your%20name%20here)"
output: Hello your name here!
printf '%s\n' "$(curl -d 'Message to repeat.' -s http://localhost:8080/echo)"
output: Message to repeat.