Deployment Overview
ReeWeb generates a fully static site - HTML, CSS, JavaScript, images, and fonts. There is no server process to keep running, no database connection to maintain, and no runtime to monitor. The output in dist/ can be deployed to any static file host.
The Generated Output
Running bun ssg produces a dist/ directory with this structure:
dist/
├── index.html ← Default locale homepage
├── about/
│ └── index.html ← Default locale /about/
├── en-us/
│ ├── index.html ← English homepage
│ └── about/
│ └── index.html ← English /about/
├── blog/
│ └── post-title/
│ └── index.html ← Blog post
├── css/
│ └── style.css ← Compiled Tailwind CSS
├── _redirects ← Cloudflare-style redirect rules
├── favicon.ico
└── ...
Each page is rendered as index.html inside a directory named after the URL path. This is the standard pattern for static hosting - example.com/about/ serves about/index.html automatically on most hosts.
Choosing a Host
Any static file host that serves index.html from directories works with ReeWeb. The most common options:
| Host | Notes |
|---|---|
| Cloudflare Workers Static Assets | Included Wrangler config, _redirects, optional Worker code |
| Netlify | Reads _redirects natively, form handling available |
| Vercel | Zero-config, automatic HTTPS, global CDN |
| GitHub Pages | Free for public repositories, deploy with GitHub Actions |
| S3 + CloudFront | Full control, pay-per-request pricing |
| Any VPS | Serve with nginx, Caddy, or any static file server |
Optional: Worker Code on Cloudflare
ReeWeb's default Cloudflare deployment is a Worker project serving dist/ through Workers Static Assets. Static-first does not mean static-only: the shipped project wires up a small Worker script (cf-worker.ts) by default, active via main in wrangler.jsonc, that rewrites the already-rendered HTML per request - the visitor's edge location, an A/B bucket, or a request-dependent header.
This is edge enrichment, not runtime rendering: pages are still generated as HTML ahead of time, and the Worker only post-processes that HTML. See Optional Cloudflare Worker for the full pattern.
Previewing Locally
Before deploying, preview the generated site:
bun ssg
bun preview
The preview server (scripts/preview.ts) serves dist/ on http://localhost:3000 with proper MIME types and directory index resolution. It detects locale subdirectories automatically.
Quick Online Preview with Cloudflare Drop
To share the generated site or check it on a real URL without setting anything up, Cloudflare Drop deploys dist/ to Cloudflare's global network from the browser - no account required. Drag the dist/ folder (or a zip of it) onto the page and it goes live in seconds.
The deployment is temporary: it stays active for 60 minutes, then expires unless you claim it by signing up for a Cloudflare account. Drag-and-drop supports up to 1,000 files, 5 MiB per file, which is ample for a typical ReeWeb generated site.
This is ideal for a quick look or a link to send a reviewer. For a permanent deployment, use Cloudflare Workers or another host below.
Environment Variables for Production
Set SITE_URL in your production environment before static site generation:
SITE_URL=https://example.com
When set, the SSG script generates hreflang alternate links for each locale - required by Google for multi-locale SEO. Without it, hreflang links are skipped (the site still generates and works correctly).
Common Tasks
- Rebuilding on every push - see the individual deployment pages for CI/CD configuration
- Custom domains - configure through your host's dashboard
- HTTPS - all modern static hosts provide automatic HTTPS
- Cache headers - set long cache durations on the versioned CSS file, short cache on HTML