[{"data":1,"prerenderedAt":2117},["ShallowReactive",2],{"navigation":3,"-deploy-providers-cloudflare":402,"-deploy-providers-cloudflare-surround":2112},[4,93,226,232,387,399],{"title":5,"path":6,"stem":7,"children":8,"icon":92},"","\u002Fdocs","1.docs\u002F1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82,87],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","\u002Fdocs\u002Fquick-start","1.docs\u002F2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","\u002Fdocs\u002Frenderer","1.docs\u002F4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","\u002Fdocs\u002Frouting","1.docs\u002F5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","\u002Fdocs\u002Fassets","1.docs\u002F50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","\u002Fdocs\u002Fconfiguration","1.docs\u002F50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","\u002Fdocs\u002Fdatabase","1.docs\u002F50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","\u002Fdocs\u002Flifecycle","1.docs\u002F50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"OpenAPI","\u002Fdocs\u002Fopenapi","1.docs\u002F50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","\u002Fdocs\u002Fplugins","1.docs\u002F50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","\u002Fdocs\u002Ftasks","1.docs\u002F50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"WebSocket","\u002Fdocs\u002Fwebsocket","1.docs\u002F50.websocket","ri:broadcast-fill",{"title":68,"path":69,"stem":70,"icon":71},"Server Entry","\u002Fdocs\u002Fserver-entry","1.docs\u002F6.server-entry","ri:server-line",{"title":73,"path":74,"stem":75,"icon":76},"Cache","\u002Fdocs\u002Fcache","1.docs\u002F7.cache","ri:speed-line",{"title":78,"path":79,"stem":80,"icon":81},"KV Storage","\u002Fdocs\u002Fstorage","1.docs\u002F8.storage","carbon:datastore",{"title":83,"path":84,"stem":85,"icon":86},"Migration Guide","\u002Fdocs\u002Fmigration","1.docs\u002F99.migration","ri:arrow-right-up-line",{"title":88,"path":89,"stem":90,"icon":91},"Nightly Channel","\u002Fdocs\u002Fnightly","1.docs\u002F99.nightly","ri:moon-fill","i-lucide-book-open",{"title":94,"path":95,"stem":96,"children":97,"icon":99},"Deploy","\u002Fdeploy","2.deploy\u002F0.index",[98,100,121],{"title":94,"path":95,"stem":96,"icon":99},"ri:upload-cloud-2-line",{"title":101,"path":102,"stem":103,"children":104,"page":120},"Runtimes","\u002Fdeploy\u002Fruntimes","2.deploy\u002F10.runtimes",[105,110,115],{"title":106,"path":107,"stem":108,"icon":109},"Node.js","\u002Fdeploy\u002Fruntimes\u002Fnode","2.deploy\u002F10.runtimes\u002F1.node","akar-icons:node-fill",{"title":111,"path":112,"stem":113,"icon":114},"Bun","\u002Fdeploy\u002Fruntimes\u002Fbun","2.deploy\u002F10.runtimes\u002Fbun","simple-icons:bun",{"title":116,"path":117,"stem":118,"icon":119},"Deno","\u002Fdeploy\u002Fruntimes\u002Fdeno","2.deploy\u002F10.runtimes\u002Fdeno","simple-icons:deno",false,{"title":122,"path":123,"stem":124,"children":125,"page":120},"Providers","\u002Fdeploy\u002Fproviders","2.deploy\u002F20.providers",[126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222],{"title":127,"path":128,"stem":129},"Alwaysdata","\u002Fdeploy\u002Fproviders\u002Falwaysdata","2.deploy\u002F20.providers\u002Falwaysdata",{"title":131,"path":132,"stem":133},"AWS Lambda","\u002Fdeploy\u002Fproviders\u002Faws","2.deploy\u002F20.providers\u002Faws",{"title":135,"path":136,"stem":137},"AWS Amplify","\u002Fdeploy\u002Fproviders\u002Faws-amplify","2.deploy\u002F20.providers\u002Faws-amplify",{"title":139,"path":140,"stem":141},"Azure","\u002Fdeploy\u002Fproviders\u002Fazure","2.deploy\u002F20.providers\u002Fazure",{"title":143,"path":144,"stem":145},"Cleavr","\u002Fdeploy\u002Fproviders\u002Fcleavr","2.deploy\u002F20.providers\u002Fcleavr",{"title":147,"path":148,"stem":149},"Cloudflare","\u002Fdeploy\u002Fproviders\u002Fcloudflare","2.deploy\u002F20.providers\u002Fcloudflare",{"title":151,"path":152,"stem":153},"Deno Deploy","\u002Fdeploy\u002Fproviders\u002Fdeno-deploy","2.deploy\u002F20.providers\u002Fdeno-deploy",{"title":155,"path":156,"stem":157},"DigitalOcean","\u002Fdeploy\u002Fproviders\u002Fdigitalocean","2.deploy\u002F20.providers\u002Fdigitalocean",{"title":159,"path":160,"stem":161},"EdgeOne Pages","\u002Fdeploy\u002Fproviders\u002Fedgeone","2.deploy\u002F20.providers\u002Fedgeone",{"title":163,"path":164,"stem":165},"Firebase","\u002Fdeploy\u002Fproviders\u002Ffirebase","2.deploy\u002F20.providers\u002Ffirebase",{"title":167,"path":168,"stem":169},"Flightcontrol","\u002Fdeploy\u002Fproviders\u002Fflightcontrol","2.deploy\u002F20.providers\u002Fflightcontrol",{"title":171,"path":172,"stem":173},"Genezio","\u002Fdeploy\u002Fproviders\u002Fgenezio","2.deploy\u002F20.providers\u002Fgenezio",{"title":175,"path":176,"stem":177},"GitHub Pages","\u002Fdeploy\u002Fproviders\u002Fgithub-pages","2.deploy\u002F20.providers\u002Fgithub-pages",{"title":179,"path":180,"stem":181},"GitLab Pages","\u002Fdeploy\u002Fproviders\u002Fgitlab-pages","2.deploy\u002F20.providers\u002Fgitlab-pages",{"title":183,"path":184,"stem":185},"Heroku","\u002Fdeploy\u002Fproviders\u002Fheroku","2.deploy\u002F20.providers\u002Fheroku",{"title":187,"path":188,"stem":189},"IIS","\u002Fdeploy\u002Fproviders\u002Fiis","2.deploy\u002F20.providers\u002Fiis",{"title":191,"path":192,"stem":193},"Koyeb","\u002Fdeploy\u002Fproviders\u002Fkoyeb","2.deploy\u002F20.providers\u002Fkoyeb",{"title":195,"path":196,"stem":197},"Netlify","\u002Fdeploy\u002Fproviders\u002Fnetlify","2.deploy\u002F20.providers\u002Fnetlify",{"title":199,"path":200,"stem":201},"Platform.sh","\u002Fdeploy\u002Fproviders\u002Fplatform-sh","2.deploy\u002F20.providers\u002Fplatform-sh",{"title":203,"path":204,"stem":205},"Render.com","\u002Fdeploy\u002Fproviders\u002Frender","2.deploy\u002F20.providers\u002Frender",{"title":207,"path":208,"stem":209},"StormKit","\u002Fdeploy\u002Fproviders\u002Fstormkit","2.deploy\u002F20.providers\u002Fstormkit",{"title":211,"path":212,"stem":213},"Vercel","\u002Fdeploy\u002Fproviders\u002Fvercel","2.deploy\u002F20.providers\u002Fvercel",{"title":215,"path":216,"stem":217},"Zeabur","\u002Fdeploy\u002Fproviders\u002Fzeabur","2.deploy\u002F20.providers\u002Fzeabur",{"title":219,"path":220,"stem":221},"Zephyr Cloud","\u002Fdeploy\u002Fproviders\u002Fzephyr","2.deploy\u002F20.providers\u002Fzephyr",{"title":223,"path":224,"stem":225},"Zerops","\u002Fdeploy\u002Fproviders\u002Fzerops","2.deploy\u002F20.providers\u002Fzerops",{"title":227,"path":228,"stem":229,"children":230,"icon":36},"Config","\u002Fconfig","3.config\u002F0.index",[231],{"title":227,"path":228,"stem":229,"icon":36},{"title":233,"path":234,"stem":235,"children":236,"icon":238},"Examples","\u002Fexamples","4.examples\u002F0.index",[237,239,244,249,254,259,263,268,273,278,283,288,293,297,302,306,310,315,320,325,330,335,340,345,350,355,359,364,369,373,378,383],{"title":233,"path":234,"stem":235,"icon":238},"i-lucide-folder-code",{"title":240,"path":241,"stem":242,"icon":243},"API Routes","\u002Fexamples\u002Fapi-routes","4.examples\u002Fapi-routes","i-lucide-route",{"title":245,"path":246,"stem":247,"icon":248},"Auto Imports","\u002Fexamples\u002Fauto-imports","4.examples\u002Fauto-imports","i-lucide-import",{"title":250,"path":251,"stem":252,"icon":253},"Cached Handler","\u002Fexamples\u002Fcached-handler","4.examples\u002Fcached-handler","i-lucide-clock",{"title":255,"path":256,"stem":257,"icon":258},"Custom Error Handler","\u002Fexamples\u002Fcustom-error-handler","4.examples\u002Fcustom-error-handler","i-lucide-alert-circle",{"title":38,"path":260,"stem":261,"icon":262},"\u002Fexamples\u002Fdatabase","4.examples\u002Fdatabase","i-lucide-database",{"title":264,"path":265,"stem":266,"icon":267},"Elysia","\u002Fexamples\u002Felysia","4.examples\u002Felysia","i-skill-icons-elysia-dark",{"title":269,"path":270,"stem":271,"icon":272},"Express","\u002Fexamples\u002Fexpress","4.examples\u002Fexpress","i-simple-icons-express",{"title":274,"path":275,"stem":276,"icon":277},"Fastify","\u002Fexamples\u002Ffastify","4.examples\u002Ffastify","i-simple-icons-fastify",{"title":279,"path":280,"stem":281,"icon":282},"Hello World","\u002Fexamples\u002Fhello-world","4.examples\u002Fhello-world","i-lucide-sparkles",{"title":284,"path":285,"stem":286,"icon":287},"Hono","\u002Fexamples\u002Fhono","4.examples\u002Fhono","i-logos-hono",{"title":289,"path":290,"stem":291,"icon":292},"Import Alias","\u002Fexamples\u002Fimport-alias","4.examples\u002Fimport-alias","i-lucide-at-sign",{"title":294,"path":295,"stem":296,"icon":46},"Middleware","\u002Fexamples\u002Fmiddleware","4.examples\u002Fmiddleware",{"title":298,"path":299,"stem":300,"icon":301},"Mono JSX","\u002Fexamples\u002Fmono-jsx","4.examples\u002Fmono-jsx","i-lucide-brackets",{"title":303,"path":304,"stem":305,"icon":301},"Nano JSX","\u002Fexamples\u002Fnano-jsx","4.examples\u002Fnano-jsx",{"title":53,"path":307,"stem":308,"icon":309},"\u002Fexamples\u002Fplugins","4.examples\u002Fplugins","i-lucide-plug",{"title":311,"path":312,"stem":313,"icon":314},"Custom Renderer","\u002Fexamples\u002Frenderer","4.examples\u002Frenderer","i-lucide-code",{"title":316,"path":317,"stem":318,"icon":319},"Runtime Config","\u002Fexamples\u002Fruntime-config","4.examples\u002Fruntime-config","i-lucide-settings",{"title":321,"path":322,"stem":323,"icon":324},"Server Fetch","\u002Fexamples\u002Fserver-fetch","4.examples\u002Fserver-fetch","i-lucide-arrow-right-left",{"title":326,"path":327,"stem":328,"icon":329},"Shiki","\u002Fexamples\u002Fshiki","4.examples\u002Fshiki","i-lucide-highlighter",{"title":331,"path":332,"stem":333,"icon":334},"Virtual Routes","\u002Fexamples\u002Fvirtual-routes","4.examples\u002Fvirtual-routes","i-lucide-box",{"title":336,"path":337,"stem":338,"icon":339},"Vite Nitro Plugin","\u002Fexamples\u002Fvite-nitro-plugin","4.examples\u002Fvite-nitro-plugin","i-logos-vitejs",{"title":341,"path":342,"stem":343,"icon":344},"Vite RSC","\u002Fexamples\u002Fvite-rsc","4.examples\u002Fvite-rsc","i-logos-react",{"title":346,"path":347,"stem":348,"icon":349},"Vite SSR HTML","\u002Fexamples\u002Fvite-ssr-html","4.examples\u002Fvite-ssr-html","i-logos-html-5",{"title":351,"path":352,"stem":353,"icon":354},"SSR with Preact","\u002Fexamples\u002Fvite-ssr-preact","4.examples\u002Fvite-ssr-preact","i-logos-preact",{"title":356,"path":357,"stem":358,"icon":344},"SSR with React","\u002Fexamples\u002Fvite-ssr-react","4.examples\u002Fvite-ssr-react",{"title":360,"path":361,"stem":362,"icon":363},"SSR with SolidJS","\u002Fexamples\u002Fvite-ssr-solid","4.examples\u002Fvite-ssr-solid","i-logos-solidjs-icon",{"title":365,"path":366,"stem":367,"icon":368},"SSR with TanStack Router","\u002Fexamples\u002Fvite-ssr-tsr-react","4.examples\u002Fvite-ssr-tsr-react","i-simple-icons-tanstack",{"title":370,"path":371,"stem":372,"icon":368},"SSR with TanStack Start","\u002Fexamples\u002Fvite-ssr-tss-react","4.examples\u002Fvite-ssr-tss-react",{"title":374,"path":375,"stem":376,"icon":377},"SSR with Vue Router","\u002Fexamples\u002Fvite-ssr-vue-router","4.examples\u002Fvite-ssr-vue-router","i-logos-vue",{"title":379,"path":380,"stem":381,"icon":382},"Vite + tRPC","\u002Fexamples\u002Fvite-trpc","4.examples\u002Fvite-trpc","i-simple-icons-trpc",{"title":63,"path":384,"stem":385,"icon":386},"\u002Fexamples\u002Fwebsocket","4.examples\u002Fwebsocket","i-lucide-radio",{"title":388,"path":389,"stem":390,"children":391},"Blog","\u002Fblog","9.blog",[392,395],{"title":388,"path":389,"stem":393,"icon":394},"9.blog\u002Findex","i-lucide-file-text",{"title":396,"path":397,"stem":398,"icon":394},"Nitro v3 Beta is here!","\u002Fblog\u002Fv3-beta","9.blog\u002F1.v3-beta",{"title":5,"path":400,"stem":401},"\u002F","index",{"id":403,"title":147,"body":404,"description":2106,"extension":2107,"meta":2108,"navigation":2109,"path":148,"seo":2110,"stem":149,"__hash__":2111},"content\u002F2.deploy\u002F20.providers\u002Fcloudflare.md",{"type":405,"value":406,"toc":2082},"minimark",[407,412,424,428,447,454,523,528,537,541,545,549,552,555,558,561,564,568,580,582,627,631,638,713,716,725,734,770,774,791,900,903,907,914,917,923,933,938,980,997,1000,1005,1007,1010,1013,1016,1018,1020,1023,1027,1036,1052,1056,1067,1076,1090,1219,1223,1233,1259,1275,1279,1302,1313,1323,1327,1338,1348,1356,1361,1365,1539,1543,1557,1571,1582,1585,1587,1594,1714,1718,1739,1750,1882,1895,1991,1994,1997,2006,2011,2018,2078],[408,409,411],"h2",{"id":410},"cloudflare-workers","Cloudflare Workers",[413,414,415,419,420],"p",{},[416,417,418],"strong",{},"Preset:"," ",[421,422,423],"code",{},"cloudflare_module",[425,426],"read-more",{"to":427,"title":411},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002F",[429,430,431],"note",{},[413,432,433,434,439,440,446],{},"Integration with this provider is possible with ",[435,436,438],"a",{"href":437},"\u002Fdeploy#zero-config-providers","zero configuration"," supporting ",[435,441,445],{"href":442,"rel":443},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fci-cd\u002Fbuilds\u002F",[444],"nofollow","workers builds (beta)",".",[413,448,449,450,453],{},"The following shows an example ",[421,451,452],{},"nitro.config.ts"," file for deploying a Nitro app to Cloudflare Workers.",[455,456,460],"pre",{"className":457,"code":458,"filename":452,"language":459,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n    preset: \"cloudflare_module\"\n})\n","ts",[421,461,462,485,492,508,517],{"__ignoreMap":5},[463,464,467,471,475,478,482],"span",{"class":465,"line":466},"line",1,[463,468,470],{"class":469},"so5gQ","import",[463,472,474],{"class":473},"slsVL"," { defineConfig } ",[463,476,477],{"class":469},"from",[463,479,481],{"class":480},"sfrk1"," \"nitro\"",[463,483,484],{"class":473},";\n",[463,486,488],{"class":465,"line":487},2,[463,489,491],{"emptyLinePlaceholder":490},true,"\n",[463,493,495,498,501,505],{"class":465,"line":494},3,[463,496,497],{"class":469},"export",[463,499,500],{"class":469}," default",[463,502,504],{"class":503},"shcOC"," defineConfig",[463,506,507],{"class":473},"({\n",[463,509,511,514],{"class":465,"line":510},4,[463,512,513],{"class":473},"    preset: ",[463,515,516],{"class":480},"\"cloudflare_module\"\n",[463,518,520],{"class":465,"line":519},5,[463,521,522],{"class":473},"})\n",[524,525,527],"h3",{"id":526},"local-preview","Local Preview",[413,529,530,531,536],{},"You can use ",[435,532,535],{"href":533,"rel":534},"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fworkers-sdk\u002Ftree\u002Fmain\u002Fpackages\u002Fwrangler",[444],"Wrangler"," to preview your app locally:",[538,539],"pm-run",{"script":540},"build",[542,543],"pm-x",{"command":544},"wrangler dev",[524,546,548],{"id":547},"manual-deploy","Manual Deploy",[413,550,551],{},"After having built your application you can manually deploy it with Wrangler.",[413,553,554],{},"First make sure to be logged into your Cloudflare account:",[542,556],{"command":557},"wrangler login",[413,559,560],{},"Then you can deploy the application with:",[542,562],{"command":563},"wrangler deploy",[524,565,567],{"id":566},"runtime-hooks","Runtime Hooks",[413,569,530,570,574,575,446],{},[435,571,573],{"href":572},"\u002Fdocs\u002Fplugins#nitro-runtime-hooks","runtime hooks"," below in order to extend ",[435,576,579],{"href":577,"rel":578},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fruntime-apis\u002Fhandlers\u002F",[444],"Worker handlers",[425,581],{"to":572},[583,584,585,595,604,613,622],"ul",{},[586,587,588],"li",{},[435,589,592],{"href":590,"rel":591},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fruntime-apis\u002Fhandlers\u002Fscheduled\u002F",[444],[421,593,594],{},"cloudflare:scheduled",[586,596,597],{},[435,598,601],{"href":599,"rel":600},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Femail-routing\u002Femail-workers\u002Fruntime-api\u002F",[444],[421,602,603],{},"cloudflare:email",[586,605,606],{},[435,607,610],{"href":608,"rel":609},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fqueues\u002Fconfiguration\u002Fjavascript-apis\u002F#consumer",[444],[421,611,612],{},"cloudflare:queue",[586,614,615],{},[435,616,619],{"href":617,"rel":618},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fruntime-apis\u002Fhandlers\u002Ftail\u002F",[444],[421,620,621],{},"cloudflare:tail",[586,623,624],{},[421,625,626],{},"cloudflare:trace",[524,628,630],{"id":629},"additional-exports","Additional Exports",[413,632,633,634,637],{},"You can add a ",[421,635,636],{},"exports.cloudflare.ts"," file to your project root to export additional handlers or properties to the Cloudflare Worker entrypoint.",[455,639,641],{"className":457,"code":640,"filename":636,"language":459,"meta":5,"style":5},"export class MyWorkflow extends WorkflowEntrypoint {\n  async run(event: WorkflowEvent, step: WorkflowStep) {\n    \u002F\u002F ...\n  }\n}\n",[421,642,643,662,697,703,708],{"__ignoreMap":5},[463,644,645,647,650,653,656,659],{"class":465,"line":466},[463,646,497],{"class":469},[463,648,649],{"class":469}," class",[463,651,652],{"class":503}," MyWorkflow",[463,654,655],{"class":469}," extends",[463,657,658],{"class":503}," WorkflowEntrypoint",[463,660,661],{"class":473}," {\n",[463,663,664,667,670,673,677,680,683,686,689,691,694],{"class":465,"line":487},[463,665,666],{"class":469},"  async",[463,668,669],{"class":503}," run",[463,671,672],{"class":473},"(",[463,674,676],{"class":675},"sQHwn","event",[463,678,679],{"class":469},":",[463,681,682],{"class":503}," WorkflowEvent",[463,684,685],{"class":473},", ",[463,687,688],{"class":675},"step",[463,690,679],{"class":469},[463,692,693],{"class":503}," WorkflowStep",[463,695,696],{"class":473},") {\n",[463,698,699],{"class":465,"line":494},[463,700,702],{"class":701},"sCsY4","    \u002F\u002F ...\n",[463,704,705],{"class":465,"line":510},[463,706,707],{"class":473},"  }\n",[463,709,710],{"class":465,"line":519},[463,711,712],{"class":473},"}\n",[413,714,715],{},"Nitro will automatically detect this file and include its exports in the final build.",[717,718,719],"warning",{},[413,720,721,722,724],{},"The ",[421,723,636],{}," file must not have a default export.",[413,726,727,728,731,732,679],{},"You can also customize the entrypoint file location using the ",[421,729,730],{},"cloudflare.exports"," option in your ",[421,733,452],{},[455,735,737],{"className":457,"code":736,"filename":452,"language":459,"meta":5,"style":5},"export default defineConfig({\n  cloudflare: {\n    exports: \"custom-exports-entry.ts\"\n  }\n})\n",[421,738,739,749,754,762,766],{"__ignoreMap":5},[463,740,741,743,745,747],{"class":465,"line":466},[463,742,497],{"class":469},[463,744,500],{"class":469},[463,746,504],{"class":503},[463,748,507],{"class":473},[463,750,751],{"class":465,"line":487},[463,752,753],{"class":473},"  cloudflare: {\n",[463,755,756,759],{"class":465,"line":494},[463,757,758],{"class":473},"    exports: ",[463,760,761],{"class":480},"\"custom-exports-entry.ts\"\n",[463,763,764],{"class":465,"line":510},[463,765,707],{"class":473},[463,767,768],{"class":465,"line":519},[463,769,522],{"class":473},[524,771,773],{"id":772},"scheduled-tasks-cron-triggers","Scheduled Tasks (Cron Triggers)",[413,775,776,777,780,781,784,785,790],{},"When using ",[435,778,779],{"href":59},"Nitro tasks"," with ",[421,782,783],{},"scheduledTasks",", Nitro automatically generates ",[435,786,789],{"href":787,"rel":788},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fconfiguration\u002Fcron-triggers\u002F",[444],"Cron Triggers"," in the wrangler config at build time.",[455,792,794],{"className":457,"code":793,"filename":452,"language":459,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  preset: \"cloudflare_module\",\n  experimental: {\n    tasks: true,\n  },\n  scheduledTasks: {\n    \"* * * * *\": [\"cms:update\"],\n    \"0 15 1 * *\": [\"db:cleanup\"],\n  }\n})\n",[421,795,796,808,812,822,833,838,850,856,862,877,890,895],{"__ignoreMap":5},[463,797,798,800,802,804,806],{"class":465,"line":466},[463,799,470],{"class":469},[463,801,474],{"class":473},[463,803,477],{"class":469},[463,805,481],{"class":480},[463,807,484],{"class":473},[463,809,810],{"class":465,"line":487},[463,811,491],{"emptyLinePlaceholder":490},[463,813,814,816,818,820],{"class":465,"line":494},[463,815,497],{"class":469},[463,817,500],{"class":469},[463,819,504],{"class":503},[463,821,507],{"class":473},[463,823,824,827,830],{"class":465,"line":510},[463,825,826],{"class":473},"  preset: ",[463,828,829],{"class":480},"\"cloudflare_module\"",[463,831,832],{"class":473},",\n",[463,834,835],{"class":465,"line":519},[463,836,837],{"class":473},"  experimental: {\n",[463,839,841,844,848],{"class":465,"line":840},6,[463,842,843],{"class":473},"    tasks: ",[463,845,847],{"class":846},"suiK_","true",[463,849,832],{"class":473},[463,851,853],{"class":465,"line":852},7,[463,854,855],{"class":473},"  },\n",[463,857,859],{"class":465,"line":858},8,[463,860,861],{"class":473},"  scheduledTasks: {\n",[463,863,865,868,871,874],{"class":465,"line":864},9,[463,866,867],{"class":480},"    \"* * * * *\"",[463,869,870],{"class":473},": [",[463,872,873],{"class":480},"\"cms:update\"",[463,875,876],{"class":473},"],\n",[463,878,880,883,885,888],{"class":465,"line":879},10,[463,881,882],{"class":480},"    \"0 15 1 * *\"",[463,884,870],{"class":473},[463,886,887],{"class":480},"\"db:cleanup\"",[463,889,876],{"class":473},[463,891,893],{"class":465,"line":892},11,[463,894,707],{"class":473},[463,896,898],{"class":465,"line":897},12,[463,899,522],{"class":473},[413,901,902],{},"No manual Wrangler configuration is needed - Nitro handles it for you.",[408,904,906],{"id":905},"cloudflare-pages","Cloudflare Pages",[413,908,909,419,911],{},[416,910,418],{},[421,912,913],{},"cloudflare_pages",[425,915],{"to":916,"title":906},"https:\u002F\u002Fpages.cloudflare.com\u002F",[429,918,919],{},[413,920,433,921,446],{},[435,922,438],{"href":437},[717,924,925],{},[413,926,927,928,932],{},"Cloudflare ",[435,929,931],{"href":930},"#cloudflare-workers","Workers Module"," is the new recommended preset for deployments. Please consider using the pages only if you need specific features.",[413,934,449,935,937],{},[421,936,452],{}," file for deploying a Nitro app to Cloudflare Pages.",[455,939,941],{"className":457,"code":940,"filename":452,"language":459,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n    preset: \"cloudflare_pages\"\n})\n",[421,942,943,955,959,969,976],{"__ignoreMap":5},[463,944,945,947,949,951,953],{"class":465,"line":466},[463,946,470],{"class":469},[463,948,474],{"class":473},[463,950,477],{"class":469},[463,952,481],{"class":480},[463,954,484],{"class":473},[463,956,957],{"class":465,"line":487},[463,958,491],{"emptyLinePlaceholder":490},[463,960,961,963,965,967],{"class":465,"line":494},[463,962,497],{"class":469},[463,964,500],{"class":469},[463,966,504],{"class":503},[463,968,507],{"class":473},[463,970,971,973],{"class":465,"line":510},[463,972,513],{"class":473},[463,974,975],{"class":480},"\"cloudflare_pages\"\n",[463,977,978],{"class":465,"line":519},[463,979,522],{"class":473},[413,981,982,983,986,987,990,991,996],{},"Nitro automatically generates a ",[421,984,985],{},"_routes.json"," file that controls which routes get served from files and which are served from the Worker script. The auto-generated routes file can be overridden with the config option ",[421,988,989],{},"cloudflare.pages.routes"," (",[435,992,995],{"href":993,"rel":994},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fpages\u002Fplatform\u002Ffunctions\u002Frouting\u002F#functions-invocation-routes",[444],"read more",").",[524,998,527],{"id":999},"local-preview-1",[413,1001,530,1002,536],{},[435,1003,535],{"href":533,"rel":1004},[444],[538,1006],{"script":540},[542,1008],{"command":1009},"wrangler pages dev",[524,1011,548],{"id":1012},"manual-deploy-1",[413,1014,1015],{},"After having built your application you can manually deploy it with Wrangler, in order to do so first make sure to be\nlogged into your Cloudflare account:",[542,1017],{"command":557},[413,1019,560],{},[542,1021],{"command":1022},"wrangler pages deploy",[408,1024,1026],{"id":1025},"deploy-within-cicd-using-github-actions","Deploy within CI\u002FCD using GitHub Actions",[413,1028,1029,1030,1035],{},"Regardless on whether you're using Cloudflare Pages or Cloudflare Workers, you can use the ",[435,1031,1034],{"href":1032,"rel":1033},"https:\u002F\u002Fgithub.com\u002Fmarketplace\u002Factions\u002Fdeploy-to-cloudflare-workers-with-wrangler",[444],"Wrangler GitHub actions"," to deploy your application.",[429,1037,1038],{},[413,1039,1040,1043,1044,1048,1049,1051],{},[416,1041,1042],{},"Note:"," Remember to ",[435,1045,1047],{"href":1046},"\u002Fdeploy#changing-the-deployment-preset","instruct Nitro to use the correct preset"," (note that this is necessary for all presets including the ",[421,1050,913],{}," one).",[408,1053,1055],{"id":1054},"environment-variables","Environment Variables",[413,1057,1058,1059,1062,1063,1066],{},"Nitro allows you to universally access environment variables using ",[421,1060,1061],{},"process.env"," or ",[421,1064,1065],{},"import.meta.env"," or the runtime config.",[429,1068,1069],{},[413,1070,1071,1072,1075],{},"Make sure to only access environment variables ",[416,1073,1074],{},"within the event lifecycle","  and not in global contexts since Cloudflare only makes them available during the request lifecycle and not before.",[413,1077,1078,1081,1082,1085,1086,1089],{},[416,1079,1080],{},"Example:"," If you have set the ",[421,1083,1084],{},"SECRET"," and ",[421,1087,1088],{},"NITRO_HELLO_THERE"," environment variables set you can access them in the following way:",[455,1091,1093],{"className":457,"code":1092,"language":459,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\nimport { useRuntimeConfig } from \"nitro\u002Fruntime-config\";\n\nconsole.log(process.env.SECRET) \u002F\u002F note that this is in the global scope! so it doesn't actually work and the variable is undefined!\n\nexport default defineHandler((event) => {\n  \u002F\u002F note that all the below are valid ways of accessing the above mentioned variables\n  useRuntimeConfig().helloThere\n  useRuntimeConfig().secret\n  process.env.NITRO_HELLO_THERE\n  import.meta.env.SECRET\n});\n",[421,1094,1095,1108,1122,1126,1145,1149,1170,1175,1183,1190,1198,1214],{"__ignoreMap":5},[463,1096,1097,1099,1102,1104,1106],{"class":465,"line":466},[463,1098,470],{"class":469},[463,1100,1101],{"class":473}," { defineHandler } ",[463,1103,477],{"class":469},[463,1105,481],{"class":480},[463,1107,484],{"class":473},[463,1109,1110,1112,1115,1117,1120],{"class":465,"line":487},[463,1111,470],{"class":469},[463,1113,1114],{"class":473}," { useRuntimeConfig } ",[463,1116,477],{"class":469},[463,1118,1119],{"class":480}," \"nitro\u002Fruntime-config\"",[463,1121,484],{"class":473},[463,1123,1124],{"class":465,"line":494},[463,1125,491],{"emptyLinePlaceholder":490},[463,1127,1128,1131,1134,1137,1139,1142],{"class":465,"line":510},[463,1129,1130],{"class":473},"console.",[463,1132,1133],{"class":503},"log",[463,1135,1136],{"class":473},"(process.env.",[463,1138,1084],{"class":846},[463,1140,1141],{"class":473},") ",[463,1143,1144],{"class":701},"\u002F\u002F note that this is in the global scope! so it doesn't actually work and the variable is undefined!\n",[463,1146,1147],{"class":465,"line":519},[463,1148,491],{"emptyLinePlaceholder":490},[463,1150,1151,1153,1155,1158,1161,1163,1165,1168],{"class":465,"line":840},[463,1152,497],{"class":469},[463,1154,500],{"class":469},[463,1156,1157],{"class":503}," defineHandler",[463,1159,1160],{"class":473},"((",[463,1162,676],{"class":675},[463,1164,1141],{"class":473},[463,1166,1167],{"class":469},"=>",[463,1169,661],{"class":473},[463,1171,1172],{"class":465,"line":852},[463,1173,1174],{"class":701},"  \u002F\u002F note that all the below are valid ways of accessing the above mentioned variables\n",[463,1176,1177,1180],{"class":465,"line":858},[463,1178,1179],{"class":503},"  useRuntimeConfig",[463,1181,1182],{"class":473},"().helloThere\n",[463,1184,1185,1187],{"class":465,"line":864},[463,1186,1179],{"class":503},[463,1188,1189],{"class":473},"().secret\n",[463,1191,1192,1195],{"class":465,"line":879},[463,1193,1194],{"class":473},"  process.env.",[463,1196,1197],{"class":846},"NITRO_HELLO_THERE\n",[463,1199,1200,1203,1205,1208,1211],{"class":465,"line":892},[463,1201,1202],{"class":469},"  import",[463,1204,446],{"class":473},[463,1206,1207],{"class":846},"meta",[463,1209,1210],{"class":473},".env.",[463,1212,1213],{"class":846},"SECRET\n",[463,1215,1216],{"class":465,"line":897},[463,1217,1218],{"class":473},"});\n",[524,1220,1222],{"id":1221},"specify-variables-in-development-mode","Specify Variables in Development Mode",[413,1224,1225,1226,1062,1229,1232],{},"For development, you can use a ",[421,1227,1228],{},".env",[421,1230,1231],{},".env.local"," file to specify environment variables:",[455,1234,1238],{"className":1235,"code":1236,"language":1237,"meta":5,"style":5},"language-ini shiki shiki-themes github-light github-dark github-dark","NITRO_HELLO_THERE=\"captain\"\nSECRET=\"top-secret\"\n","ini",[421,1239,1240,1250],{"__ignoreMap":5},[463,1241,1242,1244,1247],{"class":465,"line":466},[463,1243,1088],{"class":469},[463,1245,1246],{"class":473},"=",[463,1248,1249],{"class":480},"\"captain\"\n",[463,1251,1252,1254,1256],{"class":465,"line":487},[463,1253,1084],{"class":469},[463,1255,1246],{"class":473},[463,1257,1258],{"class":480},"\"top-secret\"\n",[429,1260,1261],{},[413,1262,1263,1265,1266,1085,1268,1270,1271,1274],{},[416,1264,1042],{}," Make sure you add ",[421,1267,1228],{},[421,1269,1231],{}," to the ",[421,1272,1273],{},".gitignore"," file so that you don't commit it as it can contain sensitive information.",[524,1276,1278],{"id":1277},"specify-variables-for-local-previews","Specify Variables for local previews",[413,1280,1281,1282,1062,1284,1286,1287,1290,1291,1085,1296,1301],{},"After build, when you try out your project locally with ",[421,1283,544],{},[421,1285,1009],{},", in order to have access to environment variables you will need to specify the in a ",[421,1288,1289],{},".dev.vars"," file in the root of your project (as presented in the ",[435,1292,1295],{"href":1293,"rel":1294},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fpages\u002Ffunctions\u002Fbindings\u002F#interact-with-your-environment-variables-locally",[444],"Pages",[435,1297,1300],{"href":1298,"rel":1299},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fconfiguration\u002Fenvironment-variables\u002F#interact-with-environment-variables-locally",[444],"Workers"," documentation).",[413,1303,1304,1305,1062,1307,1309,1310,1312],{},"If you are using a ",[421,1306,1228],{},[421,1308,1231],{}," file while developing, your ",[421,1311,1289],{}," should be identical to it.",[429,1314,1315],{},[413,1316,1317,1265,1319,1270,1321,1274],{},[416,1318,1042],{},[421,1320,1289],{},[421,1322,1273],{},[524,1324,1326],{"id":1325},"specify-variables-for-production","Specify Variables for Production",[413,1328,1329,1330,1337],{},"For production, use the Cloudflare dashboard or the ",[435,1331,1334],{"href":1332,"rel":1333},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fwrangler\u002Fcommands\u002F#secret",[444],[421,1335,1336],{},"wrangler secret"," command to set environment variables and secrets.",[524,1339,1341,1342,400,1345],{"id":1340},"specify-variables-using-wranglertomlwranglerjson","Specify Variables using ",[421,1343,1344],{},"wrangler.toml",[421,1346,1347],{},"wrangler.json",[413,1349,1350,1351,400,1353,1355],{},"You can specify a custom ",[421,1352,1344],{},[421,1354,1347],{}," file and define vars inside.",[717,1357,1358],{},[413,1359,1360],{},"Note that this isn't recommended for sensitive data like secrets.",[413,1362,1363],{},[416,1364,1080],{},[1366,1367,1368,1431],"code-group",{},[455,1369,1371],{"className":1235,"code":1370,"filename":1344,"language":1237,"meta":5,"style":5},"# Shared\n[vars]\nNITRO_HELLO_THERE=\"general\"\nSECRET=\"secret\"\n\n# Override values for `--env production` usage\n[env.production.vars]\nNITRO_HELLO_THERE=\"captain\"\nSECRET=\"top-secret\"\n",[421,1372,1373,1378,1383,1392,1401,1405,1410,1415,1423],{"__ignoreMap":5},[463,1374,1375],{"class":465,"line":466},[463,1376,1377],{"class":701},"# Shared\n",[463,1379,1380],{"class":465,"line":487},[463,1381,1382],{"class":503},"[vars]\n",[463,1384,1385,1387,1389],{"class":465,"line":494},[463,1386,1088],{"class":469},[463,1388,1246],{"class":473},[463,1390,1391],{"class":480},"\"general\"\n",[463,1393,1394,1396,1398],{"class":465,"line":510},[463,1395,1084],{"class":469},[463,1397,1246],{"class":473},[463,1399,1400],{"class":480},"\"secret\"\n",[463,1402,1403],{"class":465,"line":519},[463,1404,491],{"emptyLinePlaceholder":490},[463,1406,1407],{"class":465,"line":840},[463,1408,1409],{"class":701},"# Override values for `--env production` usage\n",[463,1411,1412],{"class":465,"line":852},[463,1413,1414],{"class":503},"[env.production.vars]\n",[463,1416,1417,1419,1421],{"class":465,"line":858},[463,1418,1088],{"class":469},[463,1420,1246],{"class":473},[463,1422,1249],{"class":480},[463,1424,1425,1427,1429],{"class":465,"line":864},[463,1426,1084],{"class":469},[463,1428,1246],{"class":473},[463,1430,1258],{"class":480},[455,1432,1436],{"className":1433,"code":1434,"filename":1347,"language":1435,"meta":5,"style":5},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"vars\": {\n    \"NITRO_HELLO_THERE\": \"general\",\n    \"SECRET\": \"secret\"\n  },\n  \"env\": {\n    \"production\": {\n      \"vars\": {\n        \"NITRO_HELLO_THERE\": \"captain\",\n        \"SECRET\": \"top-secret\"\n      }\n    }\n  }\n}\n\n","json",[421,1437,1438,1443,1451,1464,1473,1477,1484,1491,1498,1510,1519,1524,1529,1534],{"__ignoreMap":5},[463,1439,1440],{"class":465,"line":466},[463,1441,1442],{"class":473},"{\n",[463,1444,1445,1448],{"class":465,"line":487},[463,1446,1447],{"class":846},"  \"vars\"",[463,1449,1450],{"class":473},": {\n",[463,1452,1453,1456,1459,1462],{"class":465,"line":494},[463,1454,1455],{"class":846},"    \"NITRO_HELLO_THERE\"",[463,1457,1458],{"class":473},": ",[463,1460,1461],{"class":480},"\"general\"",[463,1463,832],{"class":473},[463,1465,1466,1469,1471],{"class":465,"line":510},[463,1467,1468],{"class":846},"    \"SECRET\"",[463,1470,1458],{"class":473},[463,1472,1400],{"class":480},[463,1474,1475],{"class":465,"line":519},[463,1476,855],{"class":473},[463,1478,1479,1482],{"class":465,"line":840},[463,1480,1481],{"class":846},"  \"env\"",[463,1483,1450],{"class":473},[463,1485,1486,1489],{"class":465,"line":852},[463,1487,1488],{"class":846},"    \"production\"",[463,1490,1450],{"class":473},[463,1492,1493,1496],{"class":465,"line":858},[463,1494,1495],{"class":846},"      \"vars\"",[463,1497,1450],{"class":473},[463,1499,1500,1503,1505,1508],{"class":465,"line":864},[463,1501,1502],{"class":846},"        \"NITRO_HELLO_THERE\"",[463,1504,1458],{"class":473},[463,1506,1507],{"class":480},"\"captain\"",[463,1509,832],{"class":473},[463,1511,1512,1515,1517],{"class":465,"line":879},[463,1513,1514],{"class":846},"        \"SECRET\"",[463,1516,1458],{"class":473},[463,1518,1258],{"class":480},[463,1520,1521],{"class":465,"line":892},[463,1522,1523],{"class":473},"      }\n",[463,1525,1526],{"class":465,"line":897},[463,1527,1528],{"class":473},"    }\n",[463,1530,1532],{"class":465,"line":1531},13,[463,1533,707],{"class":473},[463,1535,1537],{"class":465,"line":1536},14,[463,1538,712],{"class":473},[408,1540,1542],{"id":1541},"direct-access-to-cloudflare-bindings","Direct access to Cloudflare bindings",[413,1544,1545,1546,1551,1552,996],{},"Bindings are what allows you to interact with resources from the Cloudflare platform, examples of such resources are key-value data storages (",[435,1547,1550],{"href":1548,"rel":1549},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fkv\u002F",[444],"KVs",") and serverless SQL databases (",[435,1553,1556],{"href":1554,"rel":1555},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fd1\u002F",[444],"D1s",[425,1558,1559],{},[413,1560,1561,1562,1085,1566,1570],{},"For more details on Bindings and how to use them please refer to the Cloudflare ",[435,1563,1295],{"href":1564,"rel":1565},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fpages\u002Ffunctions\u002Fbindings\u002F",[444],[435,1567,1300],{"href":1568,"rel":1569},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fconfiguration\u002Fbindings\u002F#bindings",[444]," documentation.",[1572,1573,1574],"tip",{},[413,1575,1576,1577,1085,1579,1581],{},"\nNitro provides high level API to interact with primitives such as ",[435,1578,78],{"href":79},[435,1580,38],{"href":39}," and you are highly recommended to prefer using them instead of directly depending on low-level APIs for usage stability.",[425,1583],{"to":39,"title":1584},"Database Layer",[425,1586],{"to":79,"title":78},[413,1588,1589,1590,1593],{},"In runtime, you can access bindings from the request event via ",[421,1591,1592],{},"event.req.runtime.cloudflare.env",". This is for example how you can access a D1 binding:",[455,1595,1597],{"className":457,"code":1596,"language":459,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\ndefineHandler(async (event) => {\n  const { env } = event.req.runtime.cloudflare\n  const stmt = await env.MY_D1.prepare('SELECT id FROM table')\n  const { results } = await stmt.all()\n})\n",[421,1598,1599,1611,1615,1635,1654,1686,1710],{"__ignoreMap":5},[463,1600,1601,1603,1605,1607,1609],{"class":465,"line":466},[463,1602,470],{"class":469},[463,1604,1101],{"class":473},[463,1606,477],{"class":469},[463,1608,481],{"class":480},[463,1610,484],{"class":473},[463,1612,1613],{"class":465,"line":487},[463,1614,491],{"emptyLinePlaceholder":490},[463,1616,1617,1620,1622,1625,1627,1629,1631,1633],{"class":465,"line":494},[463,1618,1619],{"class":503},"defineHandler",[463,1621,672],{"class":473},[463,1623,1624],{"class":469},"async",[463,1626,990],{"class":473},[463,1628,676],{"class":675},[463,1630,1141],{"class":473},[463,1632,1167],{"class":469},[463,1634,661],{"class":473},[463,1636,1637,1640,1643,1646,1649,1651],{"class":465,"line":510},[463,1638,1639],{"class":469},"  const",[463,1641,1642],{"class":473}," { ",[463,1644,1645],{"class":846},"env",[463,1647,1648],{"class":473}," } ",[463,1650,1246],{"class":469},[463,1652,1653],{"class":473}," event.req.runtime.cloudflare\n",[463,1655,1656,1658,1661,1664,1667,1670,1673,1675,1678,1680,1683],{"class":465,"line":519},[463,1657,1639],{"class":469},[463,1659,1660],{"class":846}," stmt",[463,1662,1663],{"class":469}," =",[463,1665,1666],{"class":469}," await",[463,1668,1669],{"class":473}," env.",[463,1671,1672],{"class":846},"MY_D1",[463,1674,446],{"class":473},[463,1676,1677],{"class":503},"prepare",[463,1679,672],{"class":473},[463,1681,1682],{"class":480},"'SELECT id FROM table'",[463,1684,1685],{"class":473},")\n",[463,1687,1688,1690,1692,1695,1697,1699,1701,1704,1707],{"class":465,"line":840},[463,1689,1639],{"class":469},[463,1691,1642],{"class":473},[463,1693,1694],{"class":846},"results",[463,1696,1648],{"class":473},[463,1698,1246],{"class":469},[463,1700,1666],{"class":469},[463,1702,1703],{"class":473}," stmt.",[463,1705,1706],{"class":503},"all",[463,1708,1709],{"class":473},"()\n",[463,1711,1712],{"class":465,"line":852},[463,1713,522],{"class":473},[524,1715,1717],{"id":1716},"access-to-the-bindings-in-local-dev","Access to the bindings in local dev",[413,1719,1720,1721,1726,1727,1734,1735,1738],{},"In development mode, Nitro emulates the Cloudflare environment using ",[435,1722,1725],{"href":1723,"rel":1724},"https:\u002F\u002Fminiflare.dev\u002F",[444],"Miniflare"," (the same ",[435,1728,1731],{"href":1729,"rel":1730},"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fworkerd",[444],[421,1732,1733],{},"workerd"," runtime used by Wrangler and cloudflare workers in production). This means bindings are available natively from the request event — no separate proxy or ",[421,1736,1737],{},"wrangler"," installation is required.",[413,1740,1741,1742,400,1745,400,1747,1749],{},"To access bindings in dev mode, we first define them. You can do this in a ",[421,1743,1744],{},"wrangler.jsonc",[421,1746,1347],{},[421,1748,1344],{}," file:",[1366,1751,1752,1804],{},[455,1753,1755],{"className":1235,"code":1754,"filename":1344,"language":1237,"meta":5,"style":5},"[vars]\nMY_VARIABLE=\"my-value\"\n\n[[kv_namespaces]]\nbinding = \"MY_KV\"\nid = \"xxx\"\n",[421,1756,1757,1761,1771,1775,1783,1794],{"__ignoreMap":5},[463,1758,1759],{"class":465,"line":466},[463,1760,1382],{"class":503},[463,1762,1763,1766,1768],{"class":465,"line":487},[463,1764,1765],{"class":469},"MY_VARIABLE",[463,1767,1246],{"class":473},[463,1769,1770],{"class":480},"\"my-value\"\n",[463,1772,1773],{"class":465,"line":494},[463,1774,491],{"emptyLinePlaceholder":490},[463,1776,1777,1780],{"class":465,"line":510},[463,1778,1779],{"class":503},"[[kv_namespaces]",[463,1781,1782],{"class":473},"]\n",[463,1784,1785,1788,1791],{"class":465,"line":519},[463,1786,1787],{"class":469},"binding",[463,1789,1790],{"class":473}," = ",[463,1792,1793],{"class":480},"\"MY_KV\"\n",[463,1795,1796,1799,1801],{"class":465,"line":840},[463,1797,1798],{"class":469},"id",[463,1800,1790],{"class":473},[463,1802,1803],{"class":480},"\"xxx\"\n",[455,1805,1807],{"className":1433,"code":1806,"filename":1347,"language":1435,"meta":5,"style":5},"{\n  \"vars\": {\n    \"MY_VARIABLE\": \"my-value\",\n  },\n  \"kv_namespaces\": [\n    {\n      \"binding\": \"MY_KV\",\n      \"id\": \"xxx\"\n    }\n  ]\n}\n",[421,1808,1809,1813,1819,1831,1835,1843,1848,1860,1869,1873,1878],{"__ignoreMap":5},[463,1810,1811],{"class":465,"line":466},[463,1812,1442],{"class":473},[463,1814,1815,1817],{"class":465,"line":487},[463,1816,1447],{"class":846},[463,1818,1450],{"class":473},[463,1820,1821,1824,1826,1829],{"class":465,"line":494},[463,1822,1823],{"class":846},"    \"MY_VARIABLE\"",[463,1825,1458],{"class":473},[463,1827,1828],{"class":480},"\"my-value\"",[463,1830,832],{"class":473},[463,1832,1833],{"class":465,"line":510},[463,1834,855],{"class":473},[463,1836,1837,1840],{"class":465,"line":519},[463,1838,1839],{"class":846},"  \"kv_namespaces\"",[463,1841,1842],{"class":473},": [\n",[463,1844,1845],{"class":465,"line":840},[463,1846,1847],{"class":473},"    {\n",[463,1849,1850,1853,1855,1858],{"class":465,"line":852},[463,1851,1852],{"class":846},"      \"binding\"",[463,1854,1458],{"class":473},[463,1856,1857],{"class":480},"\"MY_KV\"",[463,1859,832],{"class":473},[463,1861,1862,1865,1867],{"class":465,"line":858},[463,1863,1864],{"class":846},"      \"id\"",[463,1866,1458],{"class":473},[463,1868,1803],{"class":480},[463,1870,1871],{"class":465,"line":864},[463,1872,1528],{"class":473},[463,1874,1875],{"class":465,"line":879},[463,1876,1877],{"class":473},"  ]\n",[463,1879,1880],{"class":465,"line":892},[463,1881,712],{"class":473},[413,1883,1884,1885,1887,1888,1891,1892,1894],{},"Alternatively, you can define bindings inline in your ",[421,1886,452],{}," using the ",[421,1889,1890],{},"cloudflare.wrangler"," option (it accepts the same shape as ",[421,1893,1347],{},"):",[455,1896,1898],{"className":457,"code":1897,"filename":452,"language":459,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  preset: \"cloudflare_module\",\n  cloudflare: {\n    wrangler: {\n      vars: {\n        MY_VARIABLE: \"my-value\",\n      },\n      kv_namespaces: [{ binding: \"MY_KV\", id: \"xxx\" }],\n    },\n  },\n})\n",[421,1899,1900,1912,1916,1926,1934,1938,1943,1948,1957,1962,1978,1983,1987],{"__ignoreMap":5},[463,1901,1902,1904,1906,1908,1910],{"class":465,"line":466},[463,1903,470],{"class":469},[463,1905,474],{"class":473},[463,1907,477],{"class":469},[463,1909,481],{"class":480},[463,1911,484],{"class":473},[463,1913,1914],{"class":465,"line":487},[463,1915,491],{"emptyLinePlaceholder":490},[463,1917,1918,1920,1922,1924],{"class":465,"line":494},[463,1919,497],{"class":469},[463,1921,500],{"class":469},[463,1923,504],{"class":503},[463,1925,507],{"class":473},[463,1927,1928,1930,1932],{"class":465,"line":510},[463,1929,826],{"class":473},[463,1931,829],{"class":480},[463,1933,832],{"class":473},[463,1935,1936],{"class":465,"line":519},[463,1937,753],{"class":473},[463,1939,1940],{"class":465,"line":840},[463,1941,1942],{"class":473},"    wrangler: {\n",[463,1944,1945],{"class":465,"line":852},[463,1946,1947],{"class":473},"      vars: {\n",[463,1949,1950,1953,1955],{"class":465,"line":858},[463,1951,1952],{"class":473},"        MY_VARIABLE: ",[463,1954,1828],{"class":480},[463,1956,832],{"class":473},[463,1958,1959],{"class":465,"line":864},[463,1960,1961],{"class":473},"      },\n",[463,1963,1964,1967,1969,1972,1975],{"class":465,"line":879},[463,1965,1966],{"class":473},"      kv_namespaces: [{ binding: ",[463,1968,1857],{"class":480},[463,1970,1971],{"class":473},", id: ",[463,1973,1974],{"class":480},"\"xxx\"",[463,1976,1977],{"class":473}," }],\n",[463,1979,1980],{"class":465,"line":892},[463,1981,1982],{"class":473},"    },\n",[463,1984,1985],{"class":465,"line":897},[463,1986,855],{"class":473},[463,1988,1989],{"class":465,"line":1531},[463,1990,522],{"class":473},[413,1992,1993],{},"From this moment, when running",[538,1995],{"script":1996},"dev",[413,1998,1999,2000,1085,2002,2005],{},"you will be able to access ",[421,2001,1765],{},[421,2003,2004],{},"MY_KV"," from the request event just as illustrated above.",[2007,2008,2010],"h4",{"id":2009},"wrangler-environments","Wrangler environments",[413,2012,2013,2014,2017],{},"If you have multiple Wrangler environments, you can specify which one to use during local dev emulation with the ",[421,2015,2016],{},"cloudflare.wranglerEnv"," option:",[455,2019,2021],{"className":457,"code":2020,"filename":452,"language":459,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  preset: 'cloudflare_module',\n  cloudflare: {\n    wranglerEnv: 'preview'\n  }\n})\n",[421,2022,2023,2035,2039,2049,2058,2062,2070,2074],{"__ignoreMap":5},[463,2024,2025,2027,2029,2031,2033],{"class":465,"line":466},[463,2026,470],{"class":469},[463,2028,474],{"class":473},[463,2030,477],{"class":469},[463,2032,481],{"class":480},[463,2034,484],{"class":473},[463,2036,2037],{"class":465,"line":487},[463,2038,491],{"emptyLinePlaceholder":490},[463,2040,2041,2043,2045,2047],{"class":465,"line":494},[463,2042,497],{"class":469},[463,2044,500],{"class":469},[463,2046,504],{"class":503},[463,2048,507],{"class":473},[463,2050,2051,2053,2056],{"class":465,"line":510},[463,2052,826],{"class":473},[463,2054,2055],{"class":480},"'cloudflare_module'",[463,2057,832],{"class":473},[463,2059,2060],{"class":465,"line":519},[463,2061,753],{"class":473},[463,2063,2064,2067],{"class":465,"line":840},[463,2065,2066],{"class":473},"    wranglerEnv: ",[463,2068,2069],{"class":480},"'preview'\n",[463,2071,2072],{"class":465,"line":852},[463,2073,707],{"class":473},[463,2075,2076],{"class":465,"line":858},[463,2077,522],{"class":473},[2079,2080,2081],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}",{"title":5,"searchDepth":487,"depth":487,"links":2083},[2084,2091,2095,2096,2103],{"id":410,"depth":487,"text":411,"children":2085},[2086,2087,2088,2089,2090],{"id":526,"depth":494,"text":527},{"id":547,"depth":494,"text":548},{"id":566,"depth":494,"text":567},{"id":629,"depth":494,"text":630},{"id":772,"depth":494,"text":773},{"id":905,"depth":487,"text":906,"children":2092},[2093,2094],{"id":999,"depth":494,"text":527},{"id":1012,"depth":494,"text":548},{"id":1025,"depth":487,"text":1026},{"id":1054,"depth":487,"text":1055,"children":2097},[2098,2099,2100,2101],{"id":1221,"depth":494,"text":1222},{"id":1277,"depth":494,"text":1278},{"id":1325,"depth":494,"text":1326},{"id":1340,"depth":494,"text":2102},"Specify Variables using wrangler.toml\u002Fwrangler.json",{"id":1541,"depth":487,"text":1542,"children":2104},[2105],{"id":1716,"depth":494,"text":1717},"Deploy Nitro apps to Cloudflare.","md",{},{},{"title":147,"description":2106},"0_iTK_xG8658kOun9Aityjx9DyzxZhWr52rIxFHfuj4",[2113,2115],{"title":143,"path":144,"stem":145,"description":2114,"children":-1},"Deploy Nitro apps to Cleavr.",{"title":151,"path":152,"stem":153,"description":2116,"children":-1},"Deploy Nitro apps to Deno Deploy.",1781616767782]