Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.edgespark.dev/llms.txt

Use this file to discover all available pages before exploring further.

Running edgespark deploy triggers a multi-step pipeline that goes from your local TypeScript code to a live Cloudflare Worker.

The steps

1

Schema sync

Before building, EdgeSpark refreshes the generated files in server/src/__generated__/:
  • sys_schema.ts — platform-managed table definitions
  • sys_relations.ts — platform-managed relations
  • edgespark.d.ts — generated imports from edgespark
  • server-types.d.ts — generated runtime SDK types
This keeps generated platform schema and runtime types current without overwriting your repo-authored files in server/src/defs/.
2

Type check

The build runs tsc --noEmit to check your code for type errors. The build fails if there are type errors. This catches issues like accessing a column that no longer exists in the schema.
3

Bundle

Your application is compiled to a single JavaScript bundle using esbuild. The bundle includes your route handlers and the Drizzle schema. Platform internals are excluded — they are injected by the EdgeSpark runtime at execution time.
src/index.ts → dist/bundle.js
4

Route analysis

The CLI scans your bundle and reports the routes it found, grouped by auth convention:
Routes:
  /api/posts           GET  (login required)
  /api/posts           POST (login required)
  /api/public/feed     GET  (public)
  /api/webhooks/stripe POST (no auth)
Use edgespark deploy --dry-run to run steps 1–4 without uploading. Useful for verifying the build and route analysis in CI.
5

Upload

The bundle is uploaded to the platform. The CLI uploads your compiled code directly — no manual configuration needed.
6

Deploy to Cloudflare

The platform deploys your worker to Cloudflare’s edge network, configures all bindings (database, storage, secrets, environment), and makes it live on your current project environment within seconds.

Dry run

Run a dry run to validate your build without deploying:
edgespark deploy --dry-run
This runs schema sync, type checking, bundling, and route analysis, then exits. The output includes your bundle size and any type errors. Use this in CI pipelines to catch issues before deploying.

What changes between deploys

Each deploy is independent. edgespark deploy:
  • Always replaces the worker script with the new bundle
  • Always re-applies worker bindings and environment variables
  • Does not run database migrations — schema changes require explicit migration commands
  • Does not modify secrets — secrets are managed separately

Staging support

Staging support is coming soon, but it is not part of the public deploy flow for new projects today. The current docs only cover edgespark deploy because that is the public deploy path that exists now.

See also

Deploy your project

The current public deploy flow with edgespark deploy and --dry-run.

Environments

The current single-environment model and what staging will add later.

Declarative workflow

How schema sync at the start of every deploy works and why it matters.

CLI commands

Full reference for edgespark deploy flags and options.
Last modified on April 7, 2026