Skip to content

feat: add Todo API example project for Cloudflare Workers#82

Open
PAMulligan wants to merge 1 commit into
mainfrom
18-create-example-project-todo-api-cloudflare-workers
Open

feat: add Todo API example project for Cloudflare Workers#82
PAMulligan wants to merge 1 commit into
mainfrom
18-create-example-project-todo-api-cloudflare-workers

Conversation

@PAMulligan
Copy link
Copy Markdown
Contributor

Summary

  • Adds a complete example Todo API at examples/todo-api-cloudflare/ demonstrating Nerva's Cloudflare Workers deployment path
  • CRUD endpoints (GET/POST/PUT/DELETE) for todos using Hono, Drizzle ORM with D1 (SQLite), and Zod validation
  • 15 integration tests (Vitest + Miniflare) all passing, TypeScript strict mode, ESLint clean
  • README with prerequisites, setup instructions, API endpoint docs, curl examples, and deployment guide
  • Link added to main README Quick Start section

Test plan

  • pnpm typecheck passes (0 errors)
  • pnpm lint passes (0 errors)
  • pnpm test passes (15/15 tests: 3 health + 12 CRUD)
  • pnpm dev starts local Workers dev server on port 8787
  • CRUD operations work via curl against local server
  • pnpm db:migrate:local applies D1 migration successfully

Closes #18

Generated with Claude Code

Complete reference implementation demonstrating Nerva's Cloudflare Workers
deployment path with CRUD endpoints, D1 database, Zod validation, and
integration tests (15/15 passing).

- Hono REST API with middleware (CORS, security headers, request ID, ETag)
- Drizzle ORM with D1 (SQLite) schema and migration
- Zod request validation via @hono/zod-validator
- Vitest integration tests using Miniflare for real D1
- TypeScript strict mode with full Cloudflare Workers types
- README with setup, API docs, and deployment instructions
- Link added to main README Quick Start section

Closes #18

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@PAMulligan PAMulligan linked an issue Apr 15, 2026 that may be closed by this pull request
6 tasks
@github-actions github-actions Bot added the area: docs Documentation label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create example project: Todo API (Cloudflare Workers)

1 participant