Skip to content

worker: scaffold Cloudflare Worker with itty-router - #26

Merged
MekDrop merged 2 commits into
mainfrom
feat/issue-5-worker-scaffold
Apr 23, 2026
Merged

MekDrop merged 2 commits into
mainfrom
feat/issue-5-worker-scaffold

Conversation

@MekDrop

@MekDrop MekDrop commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add worker/wrangler.toml with name, main = "src/index.js", compatibility_date, and [vars] for SPA_URL, GH_RUNNER_OWNER, GH_RUNNER_REPO
  • Add worker/.dev.vars.example documenting required secrets for local dev
  • Add worker/src/index.js — minimal itty-router entry point; GET / returns { status: 'ok' }, all others return 404
  • Add worker/.eslintrc.cjs — ESLint config with eslint:recommended and ES module source type
  • Wire itty-router and tweetnacl as runtime deps; wrangler and eslint as devDeps in worker/package.json
  • Regenerate package-lock.json with combined frontend + worker deps

Test plan

  • npm install completes without errors
  • npm run dev:worker starts Wrangler on :8787
  • GET http://localhost:8787/ returns { status: 'ok' }
  • npm -w worker run build (wrangler deploy --dry-run) succeeds
  • npm -w worker run lint passes with no errors

Closes #5

MekDrop added 2 commits April 23, 2026 03:18
Add wrangler.toml, ESLint config, .dev.vars.example, and a minimal
itty-router entry point. Wire up itty-router and tweetnacl as runtime
deps; wrangler and eslint as devDeps. Closes #5
@MekDrop
MekDrop merged commit b43f9e4 into main Apr 23, 2026
1 check passed
@MekDrop
MekDrop deleted the feat/issue-5-worker-scaffold branch April 23, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffold Cloudflare Worker with itty-router and tweetnacl

1 participant