mirror of
https://codeberg.org/icewind/single-file-server.git
synced 2026-06-03 10:04:10 +02:00
A basic web server for single-file
- Rust 66.3%
- Nix 33.7%
| .forgejo/workflows | ||
| nix | ||
| src | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
single-file-server
A basic web server for single-file
Configuring
[listen]
# by default the server listens over tcp
# address = "0.0.0.0" # defaults to "127.0.0.1"
# port = 1234 # defaults to 7366
# you can set it to listen over a unix socket instead.
socket = "/run/single-file.sock"
[single-file]
# path to single-file-cli
executable = "/path/to/single-file" # defaults to "single-file"
[browser]
# path to the browser used by single-file
executable = "/path/to/chome" # defaults to "chromium"
In additional to the listen configuration, the server will automatically
detect if it get's activated trough systemd socket activation and takes the
provided socket.
Usage
single-file-server --config config.toml
If no config is provided, then an all-default config will be used.
You can then request the single page version of a website by requesting
<listening address>/fetch/<encoded url>.