feat: migrate to Cloudflare Workers with icon and version upload

Replace Express/SQLite and web/ with frontend/, worker/, and wrangler deploy. Add optional app icon upload, date-based app_version, and build-app workflow input.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 13:30:05 +08:00
parent 0921e5f7a1
commit b69dfc4813
55 changed files with 3285 additions and 3411 deletions

20
wrangler.toml Normal file
View File

@@ -0,0 +1,20 @@
name = "web2app"
main = "worker/src/index.ts"
compatibility_date = "2024-11-01"
[assets]
directory = "./frontend/dist"
not_found_handling = "single-page-application"
# 运行 `wrangler d1 create web2app` 后将输出的 database_id 替换下方占位符
[[d1_databases]]
binding = "DB"
database_name = "web2app"
database_id = "e45bfa13-525b-465c-8dbb-b1a716751b44"
migrations_dir = "worker/migrations"
[vars]
DEFAULT_BRANCH = "main"
MAX_UPLOAD_MB = "50"
GITHUB_OWNER = "shumengya"
GITHUB_REPO = "Web2App"