Skip to content

Cloudflare Workers

Cloudflare is the edge-oriented target in the Spry runtime matrix.

Example config

dart
import 'package:spry/config.dart';

void main() {
  defineSpryConfig(
    host: '127.0.0.1',
    port: 8787,
    target: BuildTarget.cloudflare,
    reload: ReloadStrategy.hotswap,
  );
}

Why it is different

  • the runtime model is worker-shaped, not process-shaped
  • ReloadStrategy.hotswap is usually the right development behavior
  • wranglerConfig can point to a custom Wrangler file when you need one

Good fit

  • edge deployments
  • Cloudflare-first infrastructure
  • projects that want low-latency routing close to users

Released under the MIT License.