+ Ready to check {submitted.length}{" "} + {submitted.length === 1 ? "hashtag" : "hashtags"}. Checking against + the list is coming soon. +
+ )} +diff --git a/apps/api/package.json b/apps/api/package.json index f7a1d5e..5224a5a 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "dev": "wrangler dev", + "dev": "node -e \"require('node:fs').mkdirSync('../web/dist', { recursive: true })\" && wrangler dev", "cf-typegen": "wrangler types", "postinstall": "wrangler types", "db:migrate:local": "wrangler d1 migrations apply cleanhashtags --local", diff --git a/apps/api/wrangler.jsonc b/apps/api/wrangler.jsonc index 5535eff..61802e9 100644 --- a/apps/api/wrangler.jsonc +++ b/apps/api/wrangler.jsonc @@ -3,6 +3,13 @@ "name": "cleanhashtags", "main": "src/index.ts", "compatibility_date": "2026-10-10", + // The React app (apps/web) is built to ../web/dist and served as static assets. + // Asset requests are free on the Workers plan; only /api/* invokes the Worker. + "assets": { + "directory": "../web/dist", + "not_found_handling": "single-page-application", + "run_worker_first": ["/api/*"], + }, "observability": { "enabled": true, }, diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 0000000..26b618a --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,17 @@ + + +
+ + + + ++ Ready to check {submitted.length}{" "} + {submitted.length === 1 ? "hashtag" : "hashtags"}. Checking against + the list is coming soon. +
+ )} +{tagline}
} +