wrangler.toml 828 B

1234567891011121314151617181920212223242526272829
  1. # Cloudflare Workers 配置
  2. name = "tg-live-game-api"
  3. main = "src/index.ts"
  4. compatibility_date = "2024-12-01"
  5. # 开发环境变量(部署时使用 wrangler secret 设置)
  6. [vars]
  7. JWT_SECRET = "tg-live-game-jwt-secret-key-2024-production"
  8. JWT_EXPIRES_IN = "86400"
  9. REFRESH_EXPIRES_IN = "604800"
  10. # CUSTOMER_SUBDOMAIN = "your_subdomain"
  11. # 敏感信息使用 secrets(通过 wrangler secret put 设置)
  12. # wrangler secret put CF_ACCOUNT_ID
  13. # wrangler secret put CF_API_TOKEN
  14. # wrangler secret put CUSTOMER_SUBDOMAIN
  15. # 本地开发配置
  16. [dev]
  17. port = 8787
  18. local_protocol = "http"
  19. # D1 数据库配置
  20. # 创建: wrangler d1 create tg_live_game
  21. # 初始化: wrangler d1 execute tg_live_game --file=./schema.sql
  22. [[d1_databases]]
  23. binding = "DB"
  24. database_name = "tg_live_game"
  25. database_id = "970f081e-42c8-46bb-b385-b7c1ab2ceaa5"