Migrate from Cloudflare Pages / Workers

Move from Cloudflare's edge platform to RaidFrame full-stack infrastructure.

Overview

Cloudflare Pages is great for static sites. Workers are great for edge logic. But when you need a database, background jobs, WebSockets, or anything beyond request/response — you're bolting on D1, R2, KV, Durable Objects, Queues, and Hyperdrive. That's 7 products to run one app.

RaidFrame replaces the entire stack with one platform.

What Replaces What

CloudflareRaidFrame
PagesStatic service or web service
WorkersWeb service (full Node.js runtime)
D1 (SQLite)rf add postgres (or SQLite with volumes)
R2 (Object Storage)rf add storage
KVrf add kv
Queuesrf add queue
Durable ObjectsStateful workers or Redis
HyperdriveNot needed (DB is on same network)
Cron Triggersrf cron add
Pages FunctionsWeb service API routes
Wrangler CLIrf CLI

Migrate from Pages (Static Site)

rf init
# raidframe.yaml
services:
  site:
    type: static
    build:
      command: npm run build
      output_dir: ./dist    # or ./out, ./build
rf deploy
rf domains add mysite.com

Your static site runs on RaidFrame's global CDN with automatic SSL.

Migrate from Pages + Functions

If you're using Pages Functions (server-side logic in /functions):

services:
  web:
    type: web
    build:
      dockerfile: Dockerfile
    port: 3000

Key difference: Pages Functions run in the V8 isolate (not Node.js). On RaidFrame, you get the full Node.js runtime. This means:

  • fs module works
  • All npm packages work (no 1MB Worker size limit)
  • No cold starts
  • WebSockets work natively
  • No execution time limits

Adapter Changes

If you're using a framework adapter (SvelteKit, Nuxt, Astro):

# Remove Cloudflare adapter
npm uninstall @sveltejs/adapter-cloudflare
# Install Node adapter
npm install @sveltejs/adapter-node

Update your framework config to use the Node.js adapter instead of the Cloudflare adapter.

Migrate from Workers

Workers use the fetch handler pattern:

// Cloudflare Worker
export default {
  async fetch(request, env) {
    const url = new URL(request.url);
    if (url.pathname === "/api/users") {
      const users = await env.DB.prepare("SELECT * FROM users").all();
      return new Response(JSON.stringify(users.results));
    }
    return new Response("Not found", { status: 404 });
  }
}

On RaidFrame, use any Node.js framework:

// Express (or Hono, Fastify, etc.)
import express from "express";
import { Pool } from "pg";

const app = express();
const db = new Pool({ connectionString: process.env.DATABASE_URL });

app.get("/api/users", async (req, res) => {
  const { rows } = await db.query("SELECT * FROM users");
  res.json(rows);
});

app.listen(3000);

No env bindings, no wrangler.toml, no Workers-specific APIs. Standard Node.js.

Migrate Cloudflare Services

D1 → PostgreSQL

# Export from D1
wrangler d1 export my-database --output ./d1-export.sql

# D1 is SQLite — convert to PostgreSQL syntax
# (most simple schemas work, complex ones may need manual adjustments)
rf add postgres
rf db import main d1-export.sql

R2 → RaidFrame Storage

# List R2 objects
wrangler r2 object list my-bucket

# Download and re-upload
# (or use S3-compatible tools since R2 is S3-compatible)
aws s3 sync s3://my-r2-bucket ./local/ --endpoint-url $R2_ENDPOINT
rf add storage
rf storage sync ./local/ s3://my-app-uploads/

KV → RaidFrame KV

# Export KV pairs
wrangler kv:key list --binding MY_KV --json > kv-data.json

# Import to RaidFrame
rf add kv
rf kv import ./kv-data.json

Queues → RaidFrame Queues

Replace Cloudflare Queue consumers with RaidFrame workers:

rf add queue --name tasks

Cron Triggers → RaidFrame Cron

# wrangler.toml
[triggers]
crons = ["0 * * * *"]
rf cron add "0 * * * *" "node jobs/hourly.js" --name hourly-job

What You Gain

FeatureCloudflareRaidFrame
RuntimeV8 isolate (no Node.js)Full Node.js
npm packagesLimited (1MB/10MB limit)Unlimited
WebSocketsVia Durable Objects onlyNative support
DatabasesD1 (SQLite, 10GB max)Managed Postgres (TB scale)
Background jobsQueue consumers (limited)Workers + queues + cron
File uploadsR2 (separate service)Built-in storage
Docker supportNoYes
SSH accessNoYes
Database branchingNoYes
Preview environmentsYes (basic)Full-stack (with databases)
MCP integrationNoYes

Remove Cloudflare DNS Proxy

If you were using Cloudflare as a CDN/proxy in front of another host, you can keep Cloudflare for DNS only (grey cloud) and point to RaidFrame, or move DNS entirely:

rf domains add myapp.com
# Update nameservers or A/CNAME record

RaidFrame includes its own CDN, SSL, and DDoS protection — Cloudflare's proxy is no longer needed.