Step 10 — Deploy
Ship to production. Static build, compiled binary, or Docker.
Option 1 — Static build
For sites without sessions or auth, build a fully static output. Every page is pre-rendered to HTML. Deploy to any CDN: Cloudflare Pages, Netlify, Vercel, S3.
run-what build --path . --output dist
Output is in dist/. All assets are fingerprinted. Upload the directory to your CDN.
Option 2 — Compiled binary
For apps with sessions, database, or auth — compile a single binary. Copy it to any Linux server. No runtime dependencies.
# Build the binary
cargo build --release --bin run-what
# Copy binary + project to your server
scp target/release/run-what user@server:/app/
scp -r site/ components/ what.toml user@server:/app/
# Run it
./run-what dev --path /app --port 8085
Option 3 — Docker
FROM rust:1.75-slim AS builder
WORKDIR /app
COPY . .
RUN cargo build --release --bin run-what
FROM debian:bookworm-slim
WORKDIR /app
COPY --from=builder /app/target/release/run-what .
COPY site/ site/
COPY components/ components/
COPY what.toml .
EXPOSE 8085
CMD ["./run-what", "dev", "--path", ".", "--port", "8085"]
Production databases
SQLite works well for single-server deployments. For scale-out or serverless, switch to Cloudflare D1 or Supabase — same local: query syntax, no code changes.
[database]
type = "d1"
account_id = "..."
database_id = "..."
api_token = "..."
Free tier. Serverless SQLite at the edge.
[database]
type = "supabase"
url = "https://xyz.supabase.co"
anon_key = "..."
Postgres via PostgREST API. Free tier.
Deployment via CLI
# Build a static deployment
run-what deploy --target static --output dist
# Generate sitemap.xml
run-what sitemap --host https://yoursite.com
# Run project health checks
run-what doctor
You now know how to build full-stack apps with nothing but HTML. Routing, components, layouts, sessions, database CRUD, form validation, authentication, and deployment — all without writing a line of JavaScript or backend code.
run-what buildgenerates a static site — deploy to any CDN- Single compiled binary — copy to any Linux server, no runtime needed
- Docker build with multi-stage Dockerfile keeps image size small
- Switch databases with a
what.tomlconfig change — no code changes - D1 (Cloudflare) and Supabase are both supported as production backends