A zero-config, single-binary static file server for local development.
Drop it in a folder, run it, done.
dropserve
URL → http://localhost:8000
Port → 8000
Root → /home/you/project/dist
Press Ctrl+C to stop.
Download the binary for your platform from the releases page, make it executable, and place it on your PATH.
# macOS (Apple Silicon)
curl -L https://github.com/kurtmitchell/dropserve/releases/latest/download/dropserve-darwin-arm64 \
-o /usr/local/bin/dropserve && chmod +x /usr/local/bin/dropserve
# Linux (amd64)
curl -L https://github.com/kurtmitchell/dropserve/releases/latest/download/dropserve-linux-amd64 \
-o /usr/local/bin/dropserve && chmod +x /usr/local/bin/dropserveRequires Go 1.21+.
git clone https://github.com/kurtmitchell/dropserve
cd dropserve
make build # produces ./dropserve
# or
go install github.com/kurtmitchell/dropserve/cmd/dropserve@latestdropserve [flags]
Flags:
-p, -port int Port to serve on (default: 8000)
-d, -dir string Directory to serve (default: current directory)
-o, -open Open the default browser on start
-v, -version Print version and exit
-h, -help Print usage and exit
# Serve the current directory on :8000
dropserve
# Serve a specific directory
dropserve -d ./dist
# Choose a different port
dropserve -p 3000
# Serve ./docs on :9000 and open in browser
dropserve -d ./docs -p 9000 -o
# Serve a Swagger UI build
cd swagger-ui/dist && dropserveCreate dropserve.toml in the directory where you run dropserve.
All keys are optional. CLI flags override config file values.
# dropserve.toml
port = 3000
root = "./dist"
open_browser = true| Key | Type | Default | Description |
|---|---|---|---|
port |
int | 8000 |
TCP port to listen on |
root |
string | current directory | Directory to serve |
open_browser |
bool | false |
Open browser on start |
- Zero config —
dropservejust works - Directory listing — clean HTML listing when no
index.htmlis present index.htmlauto-serve — any directory with anindex.htmlserves it directly- Correct MIME types — covers HTML, CSS, JS, JSON, SVG, PNG/JPG/WEBP, WOFF/WOFF2, fonts, video, and more — consistent across all platforms
- Graceful shutdown — Ctrl+C drains in-flight requests cleanly
- Helpful errors — port conflicts, missing directories, and bad configs produce readable messages, not Go stack traces
Build all platforms at once (requires Docker/Go cross-compile support):
make dist
# or
./build.sh distOutput in dist/:
| File | Platform |
|---|---|
dropserve-linux-amd64 |
Linux x86-64 |
dropserve-linux-arm64 |
Linux ARM64 |
dropserve-darwin-amd64 |
macOS Intel |
dropserve-darwin-arm64 |
macOS Apple Silicon |
dropserve-windows-amd64.exe |
Windows x86-64 |
Manual cross-compile for a single target:
GOOS=windows GOARCH=amd64 go build \
-ldflags "-s -w -X 'main.version=0.1.0'" \
-o dist/dropserve-windows-amd64.exe \
./cmd/dropserveCommon GOOS/GOARCH pairs:
GOOS |
GOARCH |
Target |
|---|---|---|
linux |
amd64 |
Linux 64-bit (most servers) |
linux |
arm64 |
Raspberry Pi 4, AWS Graviton |
darwin |
amd64 |
macOS Intel |
darwin |
arm64 |
macOS Apple Silicon (M1+) |
windows |
amd64 |
Windows 64-bit |
# Run tests
make test
# Build for current platform
make build
# Clean build artifacts
make cleanMIT — see LICENSE.
Author: Kurt Mitchell