Static file server with live-reload.
cargo install servile
servile ./site --port 3000
| Argument | Default | Description |
|---|---|---|
[dir] |
. |
Directory to serve |
--host |
127.0.0.1 |
Bind address |
--port |
8080 |
Port |
--debounce |
200 |
File watch debounce (ms) |
HTML responses are automatically injected with a script that long-polls the server. When a file changes in the served directory, open pages reload — but only after the HTML file being viewed exists on disk. This handles build tools that delete and recreate files.
MIT