diff --git a/readme.md b/readme.md index 6934202..2595f8b 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,18 @@ # http-rs Simple webserver, designed to be minimal and just work. +We now use clap for parsing the cli args, so dont try the old way! ``` -./http-rs PORT HTMLFILE -./http-rs 8080 ./dir/ +./http-rs --port 8080 --root ./data/to/serve ``` +## Arguments which can be used: + +- `--port` : a port where the webserver opens +- `--root` : the directory where the webserver serves files from +- `--threads` : Number of threads to use (default : 2) + ## Docker This can be run within a docker container. And tbh its very simple! @@ -23,7 +29,8 @@ COPY app/ /app/ # copy your HTML containing folder to app or some dir EXPOSE 8080 -CMD ["http-rs", "8080", "/app"] # run the app , PORT:8080;DIR:/app +# this does look bloated, but its clean! +CMD ["http-rs", "--port", "8080", "--root", "/app"] # run the app , PORT:8080;DIR:/app ``` diff --git a/src/templates/response_fail.html b/src/templates/response_fail.html index d114219..fcecbe0 100644 --- a/src/templates/response_fail.html +++ b/src/templates/response_fail.html @@ -9,7 +9,7 @@