Files
http-rs/readme.md
rattatwinko fe48b74edc
All checks were successful
Compile to Binary / build-linux (push) Successful in 1m4s
Compile to Binary / build-linux-musl (push) Successful in 1m32s
Compile to Binary / build-windows (push) Successful in 1m45s
fix readme, template_fail.html ; update general info and url in template
2026-03-23 07:16:05 +01:00

44 lines
1.1 KiB
Markdown

# 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 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!
You should use MUSL, and alpine for this.
example dockerfile:
```dockerfile
FROM alpine:3.19 # use alpine, its minimal in size
WORKDIR /app # workdir = app
COPY http-rs ./target/x86_64-unknown-linux-musl/release/http-rs # copy the binary!
COPY app/ /app/ # copy your HTML containing folder to app or some dir
EXPOSE 8080
# this does look bloated, but its clean!
CMD ["http-rs", "--port", "8080", "--root", "/app"] # run the app , PORT:8080;DIR:/app
```
### Contributers:
Currently there only is 1 Contributer, myself, that is because
the repository is privated (as of 16/03/2026)
- @rattatwinko