This commit is contained in:
Robin Appelman 2025-06-24 22:04:18 +02:00
commit 9fbe3bf7fc

34
README.md Normal file
View file

@ -0,0 +1,34 @@
# single-file-server
A basic web server for
[single-file](https://github.com/gildas-lormeau/SingleFile)
## Configuring
```toml
[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 = "/var/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"
```
## Usage
```bash
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>`.