giwiro/http-echo

By giwiro

Updated 10 months ago

🔊 A simple Rust-based web server for testing and experimenting with echo and static responses.

Image
Networking
Web servers
Monitoring & observability
1

309

giwiro/http-echo repository overview

📦 http-echo

A lightweight web server built in Rust using Actix-Web and Clap for command-line argument parsing.
It is designed for testing and experimenting with simple server behaviors. It can run in two modes:

  • echo → echoes the request path, headers, method, scheme and host.
  • static → always returns a fixed text.

 


 

🐳 Docker

Run
docker run -p 8080:8080 giwiro/http-echo:latest --mode static --static-text "Hello World" --port 8080
docker run -p 8080:8080 giwiro/http-echo:latest --mode echo --port 8080

⚙️ CLI Arguments

Usage: myapp [OPTIONS]

Options:
      --mode <MODE>                Execution mode (echo, static) [default: echo]
      --log-level <LOG_LEVEL>      Log level of the server (off, error, warn, info, debug, trace) [default: info]
      --static-text <TEXT>         Text returned by the server if execution mode is static [default: "Hello World!"]
      --host <HOST>                Server host [default: 0.0.0.0]
      --port <PORT>                Server port [default: 8080]
  -V, --version                    Print version
  -h, --help                       Print help

Tag summary

Content type

Image

Digest

sha256:641da8650

Size

5.8 MB

Last updated

10 months ago

docker pull giwiro/http-echo:0.1.0