name = "brainy-models-cdn" main = "src/index.ts" compatibility_date = "2024-01-01" # Custom domain routes = [ { pattern = "models.soulcraft.com/*", zone_name = "soulcraft.com" } ] # KV namespace for model storage kv_namespaces = [ { binding = "MODELS", id = "brainy_models_kv" } ] # R2 bucket for large model files r2_buckets = [ { binding = "MODEL_BUCKET", bucket_name = "brainy-models" } ] [env.production] vars = { ENVIRONMENT = "production" } # Cache everything for 1 year (models never change) [site] bucket = "./models" [build] command = "npm install && npm run build" # Durable Objects for download tracking [[durable_objects.bindings]] name = "DOWNLOAD_TRACKER" class_name = "DownloadTracker" script_name = "download-tracker"