Files
http-rs/readme.md
rattatwinko 938acd506b
Compile to Binary / build-linux (push) Successful in 1m21s
Compile to Binary / build-linux-musl (push) Successful in 1m47s
Compile to Binary / build-windows (push) Successful in 2m0s
Compile to Binary / release (push) Successful in 5s
readme lua additions
2026-04-29 19:10:51 +02:00

52 lines
1.5 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)
- `--lua-plugin` : A lua plugin (path to it)
- `--lua-arg` : example debug
## More on Lua plugins:
Currently its only semi implemented but its on the way. You can load a plugin and depending on where it lives the lua plugin will always choose its own
directory as its current working directory. that is the only thing which i need to mention! Documentation wise its very bad, a wiki of how the Plugin API works
will have to be written!
## 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