Skip to content

Development#12

Merged
ofcskn merged 4 commits into
mainfrom
development
May 19, 2026
Merged

Development#12
ofcskn merged 4 commits into
mainfrom
development

Conversation

@ofcskn

@ofcskn ofcskn commented May 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

ofcskn and others added 4 commits May 19, 2026 16:54
- Replace Node.js createServer/IncomingMessage with a Web API
  handleRequest(Request, ApiEnv): Response fetch handler
- Add src/worker.ts — Workers entry point (export default { fetch })
- Keep src/main.ts as a thin Node.js dev shim for `nx serve api`
- Add wrangler.toml with nodejs_compat flag and production/preview envs
- Add build:worker (ESM bundle), deploy, deploy:preview, cf:dev targets
  to project.json
- Rename ApiEnv fields to UPPER_CASE matching Cloudflare secret bindings
- Replace Buffer/node:buffer with btoa/Uint8Array (Workers-compatible)
- Fix tsconfig.spec.json: commonjs module for Jest, include src/**/*.ts
- Add moduleNameMapper in jest.config.cts to rewrite .js → no-ext
  so ts-jest resolves .ts sources under commonjs module resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cover health endpoint, OPTIONS preflight, auth guard on all 15 protected
routes (no token + bad prefix → 401), CORS_ORIGIN fallback to *, error
response shape { error: string }, and content-type header. Tests use the
Web API Request/Response directly via handleRequest — no HTTP server
required, no external mocks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- docs/en/reference/api-endpoints.md — full reference for all 20
  endpoints with method, description, request body, and response shape
- docs/tr/reference/api-endpoints.md — Turkish translation of above
- README.md — add Deploy to Cloudflare section: build:worker command,
  wrangler secret put for each binding, nx deploy/deploy:preview targets,
  Cloudflare CI/CD form values, local wrangler dev instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change outDir from ./dist to ../../dist/apps/web so the web build output
lands under the workspace dist/ tree alongside other apps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ofcskn ofcskn merged commit 00c8aac into main May 19, 2026
1 check failed
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
minimalblock c844281 May 19 2026, 01:56 PM

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.

1 participant