webadev-0.1.2 is not a library.
Visit the last successful build:
webadev-0.12.0
Webadev
A tiny web dev server with live reload, written in Rust.
Features
- Serve a static folder (HTML/CSS/JS)
- Live reload in the browser on file change
- Smart script injection (no manual setup needed)
- Auto-reconnect (reloads the page when the server restarts)
- Custom IP/port support
Usage
Install and run
# serve the current directory
Options
--dir/-d: directory to serve--port/-p: port to run on (default: 8080, use0for a random free port)--ip/-i: IP address to bind to (default: 127.0.0.1, use0.0.0.0to access from other devices)--open/-o: open the page in the browser on start (false by default; live reload keeps an already-open tab in sync across restarts)--header: additional HTTP header on every response (repeatable), e.g.--header "Access-Control-Allow-Origin: *"
Examples
Use with an external API (CORS).
Accessing from another device (LAN) (on mobile/tablets over same WiFi).
# visit: http://<your-local-ip>:9000
Local installation
# Clone the repo
# Build the project
#Run the server
# Install globally from the local package
# Compiles and copies the binary to `~/.cargo/bin/webadev`
# Use from anywhere.
# serves the current directory on 127.0.0.1:8080
# Update later after source changes