Live Serve-rs is a lightweight and fast development server with automatic file reloading. It serves static files and supports WebSockets for file change notifications, making it ideal for web development.
- Lightweight HTTP server for static files
- Automatic reloading via WebSockets
- Integration with notify for file change detection
- Support for Single Page Applications (SPA)
- Compatible with Axum and Tokio
If you have Rust installed, you can install liveserve-rs directly from crates.io:
cargo install liveserve-rsPrecompiled binaries are available on GitHub Releases. To install:
-
Download the binary for your operating system.
-
Grant execution permissions (Linux/macOS):
chmod +x liveserve-rs
-
Move the binary to a directory in your PATH, e.g.:
mv liveserve-rs /usr/local/bin/
To serve a directory (e.g., ./public) with automatic reloading:
liveserve-rs --root ./publicBy default, the server runs on port 8080, but you can change it:
liveserve-rs --port 3000If you are running a Single Page Application (SPA) that uses index.html as a fallback:
liveserve-rs --spa-entry index.htmlIf you want to contribute or run the project locally:
git clone https://github.com/your-username/liveserve-rs.git
cd liveserve-rs
cargo run -- --root ./publicThis project is licensed under the MIT License.