| Crates.io | srvr |
| lib.rs | srvr |
| version | 0.1.2 |
| created_at | 2024-01-25 14:01:13.517778+00 |
| updated_at | 2025-04-09 08:39:22.177403+00 |
| description | Simple HTTP file server |
| homepage | https://github.com/justim/srvr |
| repository | https://github.com/justim/srvr |
| max_upload_size | |
| id | 1113869 |
| size | 91,445 |
Simple HTTP file server
So simple, even the vowels are not needed
Via Cargo
cargo install srvr
Or use the git repo for the latest version
git clone git@github.com:justim/srvr.git
cd srvr
cargo install --path .
When the binary is available, using it is simple; everything is optional:
Serve files in a directory on a HTTP endpoint
Usage: srvr [OPTIONS] [BASE_DIR]
Arguments:
[BASE_DIR] The directory to serve to the world [default: .]
Options:
-a, --address <ADDRESS> The address to run srvr on, defaults to 127.0.0.1:12234
-p, --port <PORT> The port to run srvr on, defaults to 12234 (overrides `address`)
-h, --help
Runnig with Docker is also possible; make sure to expose the port and inject a volume.
docker build --tag srvr .
docker run --rm --interactive --tty --publish 12234:80 --volume ./:/var/srvr srvr
Generating completions can be done by running the binary with the
--generate-shell-completions <shell> option. There is support for bash,
elvish, fish, powershell and zsh.
srvr --generate-shell-completions fish
The output of the command should be saved in the appropriate location for your shell.