Examples
End-to-end workflows for common Cloudflare migration scenarios. Test fixtures in the repo mirror these patterns.
Next.js → Cloudflare Workers
- Copy config from
examples/nextjs/cf-ready.config.json - Run
cf-ready inspect --jsonto confirmframework: "nextjs" - Run full scan:
cf-ready scan --cwd . - Review
migration-plan.mdfor vinext vs OpenNext guidance - Fix blockers (e.g.
fsin API routes) before deploy - Optional:
cf-ready fix --ai-readinessfor public AI assets
# Expected: blockers when fs/child_process present in app code
cf-ready scan --cwd ./my-next-app --json | jq '.blockers'
Vite / React SPA → Cloudflare Pages
- Use
examples/vite/cf-ready.config.jsonas template - Set
target: "cloudflare-pages" cf-ready scan— migration score focuses on static output and build script- Ensure
npm run buildproducesdist/ - Generate SEO/AI files if missing:
cf-ready fix --seo --ai-readiness
Express / Node API → progressive migration
- Scan surfaces Node runtime blockers and suggests Hono refactor path
- Put Cloudflare in front (DNS, CDN, WAF) while refactoring APIs
- Re-scan after each migration phase
cf-ready migration-plan --cwd ./legacy-api
cf-ready deploy-check --cwd ./legacy-api
CI pipeline (GitHub Actions)
jobs:
readiness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sycu8/Cloudflare-Go-Live-Readiness/action@main
with:
cwd: .
fail-on-blocker: "true"
See GitHub Action for inputs and SARIF upload.
Post-deploy smoke test
cf-ready smoke-test --url https://my-app.pages.dev \
--config ./cf-ready.config.json
Hits each path in criticalRoutes and reports HTTP status and latency.