Generic Static Hosting

Introduction

ReeWeb's output is standard static HTML - no server-side rendering, no runtime, no database. Any web server or static host can serve it. This page covers the most common alternatives to Cloudflare Pages.

Netlify

Netlify is a popular static hosting platform with its own _redirects support (same format as Cloudflare).

Git Integration

  1. Push your project to GitHub/GitLab/Bitbucket
  2. Go to app.netlify.comAdd new siteImport an existing project
  3. Select your repository
  4. Configure:
SettingValue
SSG commandbun ssg
Publish directorydist
Environment variablesAdd SITE_URL=https://yourdomain.com

Netlify supports Bun natively - no need to specify a Node.js version.

Manual Upload

bun ssg
# zip dist/ and upload via Netlify UI

Vercel

Vercel is another zero-config option:

  1. Push to GitHub
  2. Import in the Vercel Dashboard
  3. Vercel auto-detects the project structure

Set SITE_URL in the Vercel project environment variables. The framework preset is "Other" - Vercel serves static files from dist/.

GitHub Pages

For free hosting on public repositories. GitHub's current recommendation is to generate the site in a workflow and deploy with the official Pages actions (upload-pages-artifact + deploy-pages) - this replaces the older approach of pushing the generated output to a gh-pages branch with a third-party action.

First, in your repository settings under Settings → Pages → Build and deployment, set Source to GitHub Actions. Then add the workflow:

# .github/workflows/deploy.yml
name: Deploy to GitHub Pages
on:
    push:
        branches: [main]
    workflow_dispatch:

permissions:
    contents: read
    pages: write
    id-token: write

# Allow one concurrent deployment, cancelling in-progress runs.
concurrency:
    group: pages
    cancel-in-progress: true

jobs:
    build:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v4
            - uses: oven-sh/setup-bun@v2
            - run: bun install
            - run: bun ssg
              env:
                  SITE_URL: https://username.github.io
            - uses: actions/configure-pages@v5
            - uses: actions/upload-pages-artifact@v3
              with:
                  path: ./dist

    deploy:
        needs: build
        runs-on: ubuntu-latest
        environment:
            name: github-pages
            url: ${{ steps.deployment.outputs.page_url }}
        steps:
            - id: deployment
              uses: actions/deploy-pages@v4

The permissions and id-token: write block is required - the official deploy action authenticates via OIDC, not a GITHUB_TOKEN push. No gh-pages branch is created; the artifact is deployed directly.

If your site is served from a subpath (e.g. https://username.github.io/repo/ rather than a custom domain at the root), set SITE_URL to that full base URL so links and hreflang tags resolve correctly.

S3 + CloudFront

For full control over infrastructure:

  1. Generate: bun ssg
  2. Upload dist/ to an S3 bucket:
aws s3 sync dist/ s3://my-site-bucket/ --delete
  1. Configure the bucket for static website hosting
  2. Place CloudFront in front of the bucket for HTTPS and CDN

The _redirects file doesn't work with S3 directly - you'll need to configure CloudFront Functions or Lambda@Edge to handle redirects, or use S3's own routing rules.

nginx on a VPS

server {
    listen 80;
    server_name example.com;
    root /var/www/my-site/dist;

    # Directory index
    index index.html;

    # Pretty URLs - serve index.html for directory paths
    location / {
        try_files $uri $uri/ =404;
    }

    # Gzip
    gzip on;
    gzip_types text/html text/css application/javascript image/svg+xml;

    # Cache static assets
    location ~* \.(css|js|ico|svg|woff2)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }
}

For automatic builds on push, set up a GitHub Action that SSH-es into the VPS, pulls the latest code, and rebuilds.