Create a private reports Worker with only wrangler.jsonc and index.ts.
You will run it locally and package its compiled code. This tutorial does not
provision resources or deploy to Cloudflare.
Use a checkout containing the shared Worker tooling. Install Node.js 24 and
pnpm using the root package.json pins. Install Terraform and TFLint for the
repository checks. Choose a different app name if reports already exists.
-
From a clean checkout, create a working branch.
git checkout -b add/reports-worker -
Create the Worker and its registration.
make app-create APP=reports DESCRIPTION="Internal reports API" git diff --stat git status --shortThe app folder contains two files. The command also creates
org/cloudflare/app-reports.tf, adds the app toorg/catalog.json, and refreshes the README inventory. The new Worker has no public route, Custom Domain, or enabledworkers.devendpoint. -
Install the shared toolchain and start the local Worker.
make app-setup APP=reports make app-dev APP=reports -
In another terminal, request the local address printed by Wrangler. With the default port available, run:
curl --fail http://localhost:8787/The response contains
service: "reports"andstatus: "ok". Stop the development process before continuing.
-
Generate binding types and run application checks.
make app-types APP=reports make app-verify APP=reportsGenerated types belong in the ignored
.generated/directory. Verification type-checks the Worker and performs a Wrangler dry run. -
Package the app and test that package without deploying it.
make app-package APP=reports make app-release-check APP=reportsInspect
org/apps/reports/.release/manifest.json. It namesstormtrust-reportsand records the compiled files and their checksums. Local packages use the current commit identifier; uncommitted edits do not become a production release merely because packaging succeeds. -
Verify the repository registration.
make fmt make verify git status --shortReview the two source files, Terraform declaration, catalog, and README. Build output, generated types, and release directories stay untracked.
Connect resources and shared code before following Deploy a change. Only the trusted main workflow provisions and deploys the app.