rust-web-server 17.21.0

Static file web server and HTTP toolkit written in Rust. Supports HTTP/3, HTTP/2, and HTTP/1.1. HTTP/3 and HTTP/2 require a TLS certificate; without one the server falls back to plain HTTP/1.1 automatically.
Documentation
1
2
3
4
5
6
7
8
9
10
11
# run rws with configuration set via command line args
rws --ip=127.0.0.1 --port=7777 --thread-count=100 --cors-allow-all=false --cors-allow-origins=https://foo.example,https://bar.example --cors-allow_methods=GET,POST,PUT,DELETE --cors-allow-headers=content-type,x-custom-header --cors-allow-credentials=true --cors-expose-headers=content-type,x-custom-header --cors-max-age=86400 --request-allocation-size-in-bytes=16000

# which is equivalent to
rws -i=127.0.0.1 -p=7777 -t=100 -a=false -o=https://foo.example,https://bar.example -m=GET,POST,PUT,DELETE -h=content-type,x-custom-header -c=true -e=content-type,x-custom-header -g=86400 -r=16000

# run with HTTPS and HTTP/2 (requires --features http2 build)
rws --ip=127.0.0.1 --port=443 --tls-cert-file=/path/to/cert.pem --tls-key-file=/path/to/key.pem

# which is equivalent to
rws -i=127.0.0.1 -p=443 -s=/path/to/cert.pem -k=/path/to/key.pem