Monorepo for Aesthetic.Computer
aesthetic.computer
1name = "aesthetic-grab"
2main = "src/index.ts"
3compatibility_date = "2023-09-04"
4compatibility_flags = ["nodejs_compat"]
5account_id = "YOUR_ACCOUNT_ID"
6
7# Custom domain
8routes = [
9 { pattern = "grab.aesthetic.computer", custom_domain = true }
10]
11
12# Production environment for aesthetic.computer
13[vars]
14ENVIRONMENT = "production"
15DOMAIN = "grab.aesthetic.computer"
16
17# Cache Configuration
18CACHE_TTL_SECONDS = "3600"
19CDN_CACHE_TTL_SECONDS = "86400"
20
21# Screenshot Configuration
22MAX_SCREENSHOT_AGE_MS = "604800000"
23BROWSER_TIMEOUT_MS = "30000"
24MAX_VIEWPORT_WIDTH = "1920"
25MAX_VIEWPORT_HEIGHT = "1080"
26
27# Rate Limiting
28MAX_REQUESTS_PER_MINUTE = "60"
29MAX_BROWSER_SESSIONS = "10"
30
31# Browser Rendering API binding
32[browser]
33binding = "MYBROWSER"
34
35# Durable Object Bindings
36[[durable_objects.bindings]]
37name = "BROWSER"
38class_name = "Browser"
39
40# Durable Object Migrations
41[[migrations]]
42tag = "v1"
43new_classes = ["ScreenshotDO"]
44
45[[migrations]]
46tag = "v2"
47renamed_classes = [{from = "ScreenshotDO", to = "Browser"}]
48
49# R2 Bucket Binding (optional - for long-term caching)
50# Uncomment and configure after creating bucket:
51# [[r2_buckets]]
52# binding = "SCREENSHOTS"
53# bucket_name = "aesthetic-screenshots"
54
55# Rate Limiting Configuration
56[limits]
57# cpu_ms = 50000 # 50 seconds max CPU time