index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2019-12-20 21:29:48.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2019-12-20 21:29:48.0 +00:00:00
commit
cfe394f481127c2aff6a11e31139968130ef2b8e [patch]
tree
b2672124810b7758a7e8b134143b58334acf18e5
parent
72c3858a3a4ef60f770dfbb24cbb1035896818b5
download
cfe394f481127c2aff6a11e31139968130ef2b8e.tar.gz

docs: add cli options



Diff

 README.md | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 30b19d4..62bd8fe 100644
--- a/README.md
+++ b/README.md
@@ -12,14 +12,13 @@
- Suitable for small [GNU/Linux Docker containers]https://hub.docker.com/r/joseluisq/static-web-server. It's a fully __1.4MB__ static binary thanks to [Rust and Musl libc]https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html.
- Gzip compression by default.
- Cache control headers included.
- Configurable via environment variables.
- Configurable via environment variables or CLI arguments.
- Lightweight logging support.
- Scratch and [latest Alpine Linux]https://hub.docker.com/_/alpine Docker images available.

## Missing features

- TLS support
- CLI flags setup

PRs welcome!

@@ -35,6 +34,25 @@ Server is configured either via environment variables:

Or command line arguments listed with `cargo run -- -h`.

```sh
static-web-server 1.0.0

USAGE:
    static-web-server [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --assets <assets>    Assets directory path for add cache headers functionality [env: SERVER_ASSETS=]  [default:
                             ./assets]
        --host <host>        Host address (E.g 127.0.0.1) [env: SERVER_HOST=]  [default: [::]]
        --name <name>        Name for server [env: SERVER_NAME=]  [default: my-static-server]
        --port <port>        Host port [env: SERVER_PORT=]  [default: 80]
        --root <root>        Root directory path of static files [env: SERVER_ROOT=]
```

## Docker stack

Example using [Traefik proxy]https://traefik.io/: