| Crates.io | webserve |
| lib.rs | webserve |
| version | 1.1.2 |
| created_at | 2025-04-25 04:42:50.876334+00 |
| updated_at | 2025-11-07 03:57:22.443698+00 |
| description | A lightweight web server |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1648515 |
| size | 73,417 |
A blazing-fast static file and SPA Web server written in Rust. Supports live reload, SPA fallback, and directory serving โ like npm serve, but compiled and production-ready.
-d ./dist)--spa)--watch)-h, -p)git clone https://github.com/marcuwynu23/webserve
cd webserve
cargo build --release
The executable will be located in target/release/webserve.
You can also install it globally (requires Rust):
cargo install --path .
webserve [OPTIONS]
| Flag | Description | Default |
|---|---|---|
-d, --dir |
Directory to serve files from | Current directory |
-p, --port |
Port to listen on | 8080 |
-h, --host |
Host/IP to bind | 127.0.0.1 |
--spa |
Enable SPA fallback (404 โ index.html) | disabled |
-w, --watch |
Enable file watching + auto-reload | disabled |
Serve a Vite/React app from ./dist, with SPA fallback and live reload:
webserve -d ./dist --spa --watch
MIT ยฉ Mark Wayne Menorca