Cloudflare adapter

Overview

Static pages from the CDN. Server scripts when you need them. Explore real Bascik components, streaming HTML, and API routes on Cloudflare Workers.

Explore rendering features

<script data-bascik-server>

Server scripts

Inspect dynamic request context (IP, headers, platform bindings) computed at request time before headers commit.

Stream Pattern 1

Stream swap

Shimmer skeleton cards render immediately on initial paint and swap in-place with resolved content as streams deliver.

Stream Pattern 2

Stream append

Zero-placeholder stream: page shell and footer paint first, then cards stream directly into the open response grid.

Stream Pattern 3

Stream rows

One stream script written as a generator yields a row at a time; each row covers a skeleton row as it arrives.

Server + Stream

Mixed execution

Demonstrates the two-phase lifecycle: pre-header server script execution followed by early flush and async streaming.

Interactive Client

API client

Interactive frontend UI demonstrating client-side fetch calls dispatched directly to edge API routes (/api/ping).

Components from Server Scripts

Server-rendered cards

A server script returns one component tag per book, and the Worker renders each tag with its scoped CSS at request time.

Components from Stream Scripts

Streamed cards

The same tiles appended in batches by stream scripts, in document order, with the component stylesheet sent once.

Error handling

Error demo

Trigger server, API, timeout, and stream failures to see safe error responses and a surviving streamed shell.

Static HTML + client scripts

Static interactivity

A static page served without a server invocation, with independent interactive components powered by scoped client scripts.