Static file server for local development. Serve a directory over HTTP with optional SPA routing and live reload.
cargo install webserve
Or build from source:
cargo install --path .
webserve
webserve --dir ./dist --spa --watch
webserve --open --port 8080
-d --dir |
Directory to serve (default: current) |
|---|---|
-p --port |
Port (default: 8080) |
-h --host |
Bind address (default: 127.0.0.1) |
--spa |
Fallback to index.html for client routes |
-w --watch |
Reload browser when files change |
--open |
Open default browser after start |