/** * For more details on how to configure Wrangler, refer to: * https://developers.cloudflare.com/workers/wrangler/configuration/ */ { "$schema": "node_modules/wrangler/config-schema.json", "name": "thehideout-api", "main": "src/index.js", "compatibility_date": "2025-02-24", "observability": { "enabled": true, "head_sampling_rate": 1 }, "triggers": { "crons": ["*/5 * * * *", "* * * * *"] }, /** * Smart Placement * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement */ // "placement": { "mode": "smart" }, /** * Bindings * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including * databases, object storage, AI inference, real-time communication and more. * https://developers.cloudflare.com/workers/runtime-apis/bindings/ */ /** * Environment Variables * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables */ "vars": { "THEMES_DB": "26d4d3a4-6a6f-8052-966a-000bc1c836c1", "GLOBAL_THEMES_DB": "26d4d3a4-6a6f-80a8-b5f8-000b1b040695", "PAGES_DB": "26d4d3a4-6a6f-80f1-a0fc-000b3c4c5013", "PROPERTIES_DB": "26e4d3a4-6a6f-80b8-ac80-000b7b236ebc", "BOOKINGS_DB": "26e4d3a4-6a6f-80fe-960a-000be56680fd", "GUESTS_DB": "2764d3a4-6a6f-808b-af87-000b072894d7", "MESSAGES_DB": "2754d3a4-6a6f-80b5-8f8e-000b2ab6ae7a", "REDIRECTS_DB": "2754d3a4-6a6f-80ca-b30f-000b828310d2", "BRANDING_DB": "2764d3a4-6a6f-80f6-8354-000bf2304e00", "NAVIGATION_KEY": "th-navigation-cache", "PAGES_KEY": "th-pages-cache", "IMAGES_KEY": "th-images-cache", "BOOKINGS_KEY": "th-bookings-cache", "GUESTS_KEY": "th-guests-cache", "PROPERTIES_KEY": "th-properties-cache", "SETTINGS_KEY": "th-settings-cache", "CACHE_URL": "https://thehideout.tombutcher.work/api/cache", "R2_PUBLIC_URL": "https://pub-1fbfc6d5593a4a2a8e58813f4718d6bf.r2.dev", "BLUR_HASH": "true", "SMOOBU_API_URL": "https://login.smoobu.com/api" }, "kv_namespaces": [ { "binding": "CONTENT_KV", // the variable you’ll use in the Worker "id": "05c5283d5b74488da7f90297ea350f9c" // ID from Cloudflare dashboard } ], "r2_buckets": [ { "binding": "THD_CONTENT", "bucket_name": "thd-storage" } ], "images": { "binding": "IMAGES" // i.e. available in your Worker on env.IMAGES }, "env": { "production": { "kv_namespaces": [ { "binding": "CONTENT_KV", // the variable you’ll use in the Worker "id": "05c5283d5b74488da7f90297ea350f9c" // ID from Cloudflare dashboard } ], "r2_buckets": [ { "binding": "THD_CONTENT", "bucket_name": "thd-storage" } ], "images": { "binding": "IMAGES" // i.e. available in your Worker on env.IMAGES }, "vars": { "THEMES_DB": "26d4d3a4-6a6f-8052-966a-000bc1c836c1", "GLOBAL_THEMES_DB": "26d4d3a4-6a6f-80a8-b5f8-000b1b040695", "PAGES_DB": "26d4d3a4-6a6f-80f1-a0fc-000b3c4c5013", "PROPERTIES_DB": "26e4d3a4-6a6f-80b8-ac80-000b7b236ebc", "BOOKINGS_DB": "26e4d3a4-6a6f-80fe-960a-000be56680fd", "GUESTS_DB": "2764d3a4-6a6f-808b-af87-000b072894d7", "MESSAGES_DB": "2754d3a4-6a6f-80b5-8f8e-000b2ab6ae7a", "REDIRECTS_DB": "2754d3a4-6a6f-80ca-b30f-000b828310d2", "BRANDING_DB": "2764d3a4-6a6f-80f6-8354-000bf2304e00", "NAVIGATION_KEY": "th-navigation-cache", "PAGES_KEY": "th-pages-cache", "IMAGES_KEY": "th-images-cache", "BOOKINGS_KEY": "th-bookings-cache", "GUESTS_KEY": "th-guests-cache", "PROPERTIES_KEY": "th-properties-cache", "SETTINGS_KEY": "th-settings-cache", "CACHE_URL": "https://api.thehideoutltd.com/cache", "R2_PUBLIC_URL": "https://cdn.thehideoutltd.com", "BLUR_HASH": "true", "CORS_ORIGIN": "https://thehideoutltd.com", "SMOOBU_API_URL": "https://login.smoobu.com/api" } } }, /** * Note: Use secrets to store sensitive data. * https://developers.cloudflare.com/workers/configuration/secrets/ */ /** * Static Assets * https://developers.cloudflare.com/workers/static-assets/binding/ */ // "assets": { "directory": "./public/", "binding": "ASSETS" }, /** * Service Bindings (communicate between multiple Workers) * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings */ // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }] "dev": { "ip": "0.0.0.0", "port": 8787 } }