[{"data":1,"prerenderedAt":2031},["ShallowReactive",2],{"navigation":3,"-docs-tasks":389,"-docs-tasks-surround":2026},[4,83,212,218,374,386],{"title":5,"path":6,"stem":7,"children":8,"icon":82},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","/docs/quick-start","1.docs/2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","/docs/renderer","1.docs/4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","/docs/routing","1.docs/5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","/docs/assets","1.docs/50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","/docs/configuration","1.docs/50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","/docs/database","1.docs/50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","/docs/lifecycle","1.docs/50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":53,"path":54,"stem":55,"icon":56},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":58,"path":59,"stem":60,"icon":61},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":63,"path":64,"stem":65,"icon":66},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":68,"path":69,"stem":70,"icon":71},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":73,"path":74,"stem":75,"icon":76},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":78,"path":79,"stem":80,"icon":81},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":84,"path":85,"stem":86,"children":87,"icon":89},"Deploy","/deploy","2.deploy/0.index",[88,90,111],{"title":84,"path":85,"stem":86,"icon":89},"ri:upload-cloud-2-line",{"title":91,"path":92,"stem":93,"children":94,"page":110},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[95,100,105],{"title":96,"path":97,"stem":98,"icon":99},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":101,"path":102,"stem":103,"icon":104},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":106,"path":107,"stem":108,"icon":109},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":112,"path":113,"stem":114,"children":115,"page":110},"Providers","/deploy/providers","2.deploy/20.providers",[116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208],{"title":117,"path":118,"stem":119},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":121,"path":122,"stem":123},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":125,"path":126,"stem":127},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":129,"path":130,"stem":131},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":133,"path":134,"stem":135},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":137,"path":138,"stem":139},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":141,"path":142,"stem":143},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":145,"path":146,"stem":147},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":149,"path":150,"stem":151},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":153,"path":154,"stem":155},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":157,"path":158,"stem":159},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":161,"path":162,"stem":163},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":165,"path":166,"stem":167},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":169,"path":170,"stem":171},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":173,"path":174,"stem":175},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":177,"path":178,"stem":179},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":181,"path":182,"stem":183},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":185,"path":186,"stem":187},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":189,"path":190,"stem":191},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":193,"path":194,"stem":195},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":197,"path":198,"stem":199},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":201,"path":202,"stem":203},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":205,"path":206,"stem":207},"Zephyr Cloud","/deploy/providers/zephyr","2.deploy/20.providers/zephyr",{"title":209,"path":210,"stem":211},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":213,"path":214,"stem":215,"children":216,"icon":36},"Config","/config","3.config/0.index",[217],{"title":213,"path":214,"stem":215,"icon":36},{"title":219,"path":220,"stem":221,"children":222,"icon":224},"Examples","/examples","4.examples/0.index",[223,225,230,235,240,245,249,254,259,264,269,274,279,283,288,292,296,301,306,311,316,321,326,331,336,341,345,350,355,359,364,369],{"title":219,"path":220,"stem":221,"icon":224},"i-lucide-folder-code",{"title":226,"path":227,"stem":228,"icon":229},"API Routes","/examples/api-routes","4.examples/api-routes","i-lucide-route",{"title":231,"path":232,"stem":233,"icon":234},"Auto Imports","/examples/auto-imports","4.examples/auto-imports","i-lucide-import",{"title":236,"path":237,"stem":238,"icon":239},"Cached Handler","/examples/cached-handler","4.examples/cached-handler","i-lucide-clock",{"title":241,"path":242,"stem":243,"icon":244},"Custom Error Handler","/examples/custom-error-handler","4.examples/custom-error-handler","i-lucide-alert-circle",{"title":38,"path":246,"stem":247,"icon":248},"/examples/database","4.examples/database","i-lucide-database",{"title":250,"path":251,"stem":252,"icon":253},"Elysia","/examples/elysia","4.examples/elysia","i-skill-icons-elysia-dark",{"title":255,"path":256,"stem":257,"icon":258},"Express","/examples/express","4.examples/express","i-simple-icons-express",{"title":260,"path":261,"stem":262,"icon":263},"Fastify","/examples/fastify","4.examples/fastify","i-simple-icons-fastify",{"title":265,"path":266,"stem":267,"icon":268},"Hello World","/examples/hello-world","4.examples/hello-world","i-lucide-sparkles",{"title":270,"path":271,"stem":272,"icon":273},"Hono","/examples/hono","4.examples/hono","i-logos-hono",{"title":275,"path":276,"stem":277,"icon":278},"Import Alias","/examples/import-alias","4.examples/import-alias","i-lucide-at-sign",{"title":280,"path":281,"stem":282,"icon":46},"Middleware","/examples/middleware","4.examples/middleware",{"title":284,"path":285,"stem":286,"icon":287},"Mono JSX","/examples/mono-jsx","4.examples/mono-jsx","i-lucide-brackets",{"title":289,"path":290,"stem":291,"icon":287},"Nano JSX","/examples/nano-jsx","4.examples/nano-jsx",{"title":48,"path":293,"stem":294,"icon":295},"/examples/plugins","4.examples/plugins","i-lucide-plug",{"title":297,"path":298,"stem":299,"icon":300},"Custom Renderer","/examples/renderer","4.examples/renderer","i-lucide-code",{"title":302,"path":303,"stem":304,"icon":305},"Runtime Config","/examples/runtime-config","4.examples/runtime-config","i-lucide-settings",{"title":307,"path":308,"stem":309,"icon":310},"Server Fetch","/examples/server-fetch","4.examples/server-fetch","i-lucide-arrow-right-left",{"title":312,"path":313,"stem":314,"icon":315},"Shiki","/examples/shiki","4.examples/shiki","i-lucide-highlighter",{"title":317,"path":318,"stem":319,"icon":320},"Virtual Routes","/examples/virtual-routes","4.examples/virtual-routes","i-lucide-box",{"title":322,"path":323,"stem":324,"icon":325},"Vite Nitro Plugin","/examples/vite-nitro-plugin","4.examples/vite-nitro-plugin","i-logos-vitejs",{"title":327,"path":328,"stem":329,"icon":330},"Vite RSC","/examples/vite-rsc","4.examples/vite-rsc","i-logos-react",{"title":332,"path":333,"stem":334,"icon":335},"Vite SSR HTML","/examples/vite-ssr-html","4.examples/vite-ssr-html","i-logos-html-5",{"title":337,"path":338,"stem":339,"icon":340},"SSR with Preact","/examples/vite-ssr-preact","4.examples/vite-ssr-preact","i-logos-preact",{"title":342,"path":343,"stem":344,"icon":330},"SSR with React","/examples/vite-ssr-react","4.examples/vite-ssr-react",{"title":346,"path":347,"stem":348,"icon":349},"SSR with SolidJS","/examples/vite-ssr-solid","4.examples/vite-ssr-solid","i-logos-solidjs-icon",{"title":351,"path":352,"stem":353,"icon":354},"SSR with TanStack Router","/examples/vite-ssr-tsr-react","4.examples/vite-ssr-tsr-react","i-simple-icons-tanstack",{"title":356,"path":357,"stem":358,"icon":354},"SSR with TanStack Start","/examples/vite-ssr-tss-react","4.examples/vite-ssr-tss-react",{"title":360,"path":361,"stem":362,"icon":363},"SSR with Vue Router","/examples/vite-ssr-vue-router","4.examples/vite-ssr-vue-router","i-logos-vue",{"title":365,"path":366,"stem":367,"icon":368},"Vite + tRPC","/examples/vite-trpc","4.examples/vite-trpc","i-simple-icons-trpc",{"title":370,"path":371,"stem":372,"icon":373},"WebSocket","/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":375,"path":376,"stem":377,"children":378},"Blog","/blog","9.blog",[379,382],{"title":375,"path":376,"stem":380,"icon":381},"9.blog/index","i-lucide-file-text",{"title":383,"path":384,"stem":385,"icon":381},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":387,"stem":388},"/","index",{"id":390,"title":53,"body":391,"description":2020,"extension":2021,"meta":2022,"navigation":2023,"path":54,"seo":2024,"stem":55,"__hash__":2025},"content/1.docs/50.tasks.md",{"type":392,"value":393,"toc":1998,"icon":56},"minimark",[394,399,414,417,501,505,512,527,533,644,649,656,695,805,810,818,853,906,910,913,1005,1016,1020,1023,1103,1109,1121,1135,1139,1224,1229,1232,1244,1326,1330,1341,1345,1461,1465,1471,1485,1491,1495,1498,1502,1509,1512,1641,1647,1653,1900,1906,1910,1919,1923,1941,1945,1968,1974,1978,1982,1989,1994],[395,396,398],"h2",{"id":397},"opt-in-to-the-experimental-feature","Opt-in to the experimental feature",[400,401,402],"important",{},[403,404,405,406,413],"p",{},"\nTasks support is currently experimental.\nSee ",[407,408,412],"a",{"href":409,"rel":410},"https://github.com/nitrojs/nitro/issues/1974",[411],"nofollow","nitrojs/nitro#1974"," for the relevant discussion.",[403,415,416],{},"In order to use the tasks API you need to enable experimental feature flag.",[418,419,424],"pre",{"className":420,"code":421,"filename":422,"language":423,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  experimental: {\n    tasks: true\n  }\n})\n","nitro.config.ts","ts",[425,426,427,450,457,473,479,489,495],"code",{"__ignoreMap":5},[428,429,432,436,440,443,447],"span",{"class":430,"line":431},"line",1,[428,433,435],{"class":434},"so5gQ","import",[428,437,439],{"class":438},"slsVL"," { defineConfig } ",[428,441,442],{"class":434},"from",[428,444,446],{"class":445},"sfrk1"," \"nitro\"",[428,448,449],{"class":438},";\n",[428,451,453],{"class":430,"line":452},2,[428,454,456],{"emptyLinePlaceholder":455},true,"\n",[428,458,460,463,466,470],{"class":430,"line":459},3,[428,461,462],{"class":434},"export",[428,464,465],{"class":434}," default",[428,467,469],{"class":468},"shcOC"," defineConfig",[428,471,472],{"class":438},"({\n",[428,474,476],{"class":430,"line":475},4,[428,477,478],{"class":438},"  experimental: {\n",[428,480,482,485],{"class":430,"line":481},5,[428,483,484],{"class":438},"    tasks: ",[428,486,488],{"class":487},"suiK_","true\n",[428,490,492],{"class":430,"line":491},6,[428,493,494],{"class":438},"  }\n",[428,496,498],{"class":430,"line":497},7,[428,499,500],{"class":438},"})\n",[395,502,504],{"id":503},"define-tasks","Define tasks",[403,506,507,508,511],{},"Tasks can be defined in ",[425,509,510],{},"tasks/[name].ts"," files.",[403,513,514,515,518,519,522,523,526],{},"Nested directories are supported. The task name will be joined with ",[425,516,517],{},":",". (Example: ",[425,520,521],{},"tasks/db/migrate.ts"," task name will be ",[425,524,525],{},"db:migrate",")",[403,528,529],{},[530,531,532],"strong",{},"Example:",[418,534,536],{"className":420,"code":535,"filename":521,"language":423,"meta":5,"style":5},"export default defineTask({\n  meta: {\n    name: \"db:migrate\",\n    description: \"Run database migrations\",\n  },\n  run({ payload, context }) {\n    console.log(\"Running DB migration task...\");\n    return { result: \"Success\" };\n  },\n});\n",[425,537,538,549,554,565,575,580,601,618,633,638],{"__ignoreMap":5},[428,539,540,542,544,547],{"class":430,"line":431},[428,541,462],{"class":434},[428,543,465],{"class":434},[428,545,546],{"class":468}," defineTask",[428,548,472],{"class":438},[428,550,551],{"class":430,"line":452},[428,552,553],{"class":438},"  meta: {\n",[428,555,556,559,562],{"class":430,"line":459},[428,557,558],{"class":438},"    name: ",[428,560,561],{"class":445},"\"db:migrate\"",[428,563,564],{"class":438},",\n",[428,566,567,570,573],{"class":430,"line":475},[428,568,569],{"class":438},"    description: ",[428,571,572],{"class":445},"\"Run database migrations\"",[428,574,564],{"class":438},[428,576,577],{"class":430,"line":481},[428,578,579],{"class":438},"  },\n",[428,581,582,585,588,592,595,598],{"class":430,"line":491},[428,583,584],{"class":468},"  run",[428,586,587],{"class":438},"({ ",[428,589,591],{"class":590},"sQHwn","payload",[428,593,594],{"class":438},", ",[428,596,597],{"class":590},"context",[428,599,600],{"class":438}," }) {\n",[428,602,603,606,609,612,615],{"class":430,"line":497},[428,604,605],{"class":438},"    console.",[428,607,608],{"class":468},"log",[428,610,611],{"class":438},"(",[428,613,614],{"class":445},"\"Running DB migration task...\"",[428,616,617],{"class":438},");\n",[428,619,621,624,627,630],{"class":430,"line":620},8,[428,622,623],{"class":434},"    return",[428,625,626],{"class":438}," { result: ",[428,628,629],{"class":445},"\"Success\"",[428,631,632],{"class":438}," };\n",[428,634,636],{"class":430,"line":635},9,[428,637,579],{"class":438},[428,639,641],{"class":430,"line":640},10,[428,642,643],{"class":438},"});\n",[645,646,648],"h3",{"id":647},"task-interface","Task interface",[403,650,651,652,655],{},"The ",[425,653,654],{},"defineTask"," helper accepts an object with the following properties:",[657,658,659,676],"ul",{},[660,661,662,667,668,671,672,675],"li",{},[530,663,664],{},[425,665,666],{},"meta"," (optional): An object with optional ",[425,669,670],{},"name"," and ",[425,673,674],{},"description"," string fields used for display in the dev server and CLI.",[660,677,678,683,684,690,691,694],{},[530,679,680],{},[425,681,682],{},"run"," (required): A function that receives a ",[407,685,687],{"href":686},"#taskevent",[425,688,689],{},"TaskEvent"," and returns (or resolves to) an object with an optional ",[425,692,693],{},"result"," property.",[418,696,698],{"className":420,"code":697,"language":423,"meta":5,"style":5},"interface Task\u003CRT = unknown> {\n  meta?: { name?: string; description?: string };\n  run(event: TaskEvent): { result?: RT } | Promise\u003C{ result?: RT }>;\n}\n",[425,699,700,723,752,800],{"__ignoreMap":5},[428,701,702,705,708,711,714,717,720],{"class":430,"line":431},[428,703,704],{"class":434},"interface",[428,706,707],{"class":468}," Task",[428,709,710],{"class":438},"\u003C",[428,712,713],{"class":468},"RT",[428,715,716],{"class":434}," =",[428,718,719],{"class":487}," unknown",[428,721,722],{"class":438},"> {\n",[428,724,725,728,731,734,736,738,741,744,746,748,750],{"class":430,"line":452},[428,726,727],{"class":590},"  meta",[428,729,730],{"class":434},"?:",[428,732,733],{"class":438}," { ",[428,735,670],{"class":590},[428,737,730],{"class":434},[428,739,740],{"class":487}," string",[428,742,743],{"class":438},"; ",[428,745,674],{"class":590},[428,747,730],{"class":434},[428,749,740],{"class":487},[428,751,632],{"class":438},[428,753,754,756,758,761,763,766,768,770,772,774,776,779,782,785,788,791,793,795,797],{"class":430,"line":459},[428,755,584],{"class":468},[428,757,611],{"class":438},[428,759,760],{"class":590},"event",[428,762,517],{"class":434},[428,764,765],{"class":468}," TaskEvent",[428,767,526],{"class":438},[428,769,517],{"class":434},[428,771,733],{"class":438},[428,773,693],{"class":590},[428,775,730],{"class":434},[428,777,778],{"class":468}," RT",[428,780,781],{"class":438}," } ",[428,783,784],{"class":434},"|",[428,786,787],{"class":468}," Promise",[428,789,790],{"class":438},"\u003C{ ",[428,792,693],{"class":590},[428,794,730],{"class":434},[428,796,778],{"class":468},[428,798,799],{"class":438}," }>;\n",[428,801,802],{"class":430,"line":475},[428,803,804],{"class":438},"}\n",[645,806,808],{"id":807},"taskevent",[425,809,689],{},[403,811,651,812,814,815,817],{},[425,813,682],{}," function receives a ",[425,816,689],{}," object with the following properties:",[657,819,820,827,838],{},[660,821,822,826],{},[530,823,824],{},[425,825,670],{},": The name of the task being executed.",[660,828,829,833,834,837],{},[530,830,831],{},[425,832,591],{},": An object (",[425,835,836],{},"Record\u003Cstring, unknown>",") containing any data passed to the task.",[660,839,840,844,845,848,849,852],{},[530,841,842],{},[425,843,597],{},": A ",[425,846,847],{},"TaskContext"," object (may include ",[425,850,851],{},"waitUntil"," depending on the runtime).",[418,854,856],{"className":420,"code":855,"language":423,"meta":5,"style":5},"interface TaskEvent {\n  name: string;\n  payload: TaskPayload;\n  context: TaskContext;\n}\n",[425,857,858,867,878,890,902],{"__ignoreMap":5},[428,859,860,862,864],{"class":430,"line":431},[428,861,704],{"class":434},[428,863,765],{"class":468},[428,865,866],{"class":438}," {\n",[428,868,869,872,874,876],{"class":430,"line":452},[428,870,871],{"class":590},"  name",[428,873,517],{"class":434},[428,875,740],{"class":487},[428,877,449],{"class":438},[428,879,880,883,885,888],{"class":430,"line":459},[428,881,882],{"class":590},"  payload",[428,884,517],{"class":434},[428,886,887],{"class":468}," TaskPayload",[428,889,449],{"class":438},[428,891,892,895,897,900],{"class":430,"line":475},[428,893,894],{"class":590},"  context",[428,896,517],{"class":434},[428,898,899],{"class":468}," TaskContext",[428,901,449],{"class":438},[428,903,904],{"class":430,"line":481},[428,905,804],{"class":438},[645,907,909],{"id":908},"registering-tasks-via-config","Registering tasks via config",[403,911,912],{},"In addition to file-based scanning, tasks can be registered directly in the Nitro config. This is useful for tasks provided by modules or pointing to custom handler paths.",[418,914,916],{"className":420,"code":915,"filename":422,"language":423,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  experimental: {\n    tasks: true\n  },\n  tasks: {\n    \"db:migrate\": {\n      handler: \"./tasks/custom-migrate.ts\",\n      description: \"Run database migrations\"\n    }\n  }\n})\n",[425,917,918,930,934,944,948,954,958,963,971,981,989,995,1000],{"__ignoreMap":5},[428,919,920,922,924,926,928],{"class":430,"line":431},[428,921,435],{"class":434},[428,923,439],{"class":438},[428,925,442],{"class":434},[428,927,446],{"class":445},[428,929,449],{"class":438},[428,931,932],{"class":430,"line":452},[428,933,456],{"emptyLinePlaceholder":455},[428,935,936,938,940,942],{"class":430,"line":459},[428,937,462],{"class":434},[428,939,465],{"class":434},[428,941,469],{"class":468},[428,943,472],{"class":438},[428,945,946],{"class":430,"line":475},[428,947,478],{"class":438},[428,949,950,952],{"class":430,"line":481},[428,951,484],{"class":438},[428,953,488],{"class":487},[428,955,956],{"class":430,"line":491},[428,957,579],{"class":438},[428,959,960],{"class":430,"line":497},[428,961,962],{"class":438},"  tasks: {\n",[428,964,965,968],{"class":430,"line":620},[428,966,967],{"class":445},"    \"db:migrate\"",[428,969,970],{"class":438},": {\n",[428,972,973,976,979],{"class":430,"line":635},[428,974,975],{"class":438},"      handler: ",[428,977,978],{"class":445},"\"./tasks/custom-migrate.ts\"",[428,980,564],{"class":438},[428,982,983,986],{"class":430,"line":640},[428,984,985],{"class":438},"      description: ",[428,987,988],{"class":445},"\"Run database migrations\"\n",[428,990,992],{"class":430,"line":991},11,[428,993,994],{"class":438},"    }\n",[428,996,998],{"class":430,"line":997},12,[428,999,494],{"class":438},[428,1001,1003],{"class":430,"line":1002},13,[428,1004,500],{"class":438},[403,1006,1007,1008,1011,1012,1015],{},"If a task is both scanned from the ",[425,1009,1010],{},"tasks/"," directory and defined in the config, the config-defined ",[425,1013,1014],{},"handler"," takes precedence.",[395,1017,1019],{"id":1018},"scheduled-tasks","Scheduled tasks",[403,1021,1022],{},"You can define scheduled tasks using Nitro configuration to automatically run after each period of time.",[418,1024,1026],{"className":420,"code":1025,"filename":422,"language":423,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  scheduledTasks: {\n    // Run `cms:update` task every minute\n    '* * * * *': ['cms:update'],\n    // Run a single task (string shorthand)\n    '0 * * * *': 'db:cleanup'\n  }\n})\n",[425,1027,1028,1040,1044,1054,1059,1065,1079,1084,1095,1099],{"__ignoreMap":5},[428,1029,1030,1032,1034,1036,1038],{"class":430,"line":431},[428,1031,435],{"class":434},[428,1033,439],{"class":438},[428,1035,442],{"class":434},[428,1037,446],{"class":445},[428,1039,449],{"class":438},[428,1041,1042],{"class":430,"line":452},[428,1043,456],{"emptyLinePlaceholder":455},[428,1045,1046,1048,1050,1052],{"class":430,"line":459},[428,1047,462],{"class":434},[428,1049,465],{"class":434},[428,1051,469],{"class":468},[428,1053,472],{"class":438},[428,1055,1056],{"class":430,"line":475},[428,1057,1058],{"class":438},"  scheduledTasks: {\n",[428,1060,1061],{"class":430,"line":481},[428,1062,1064],{"class":1063},"sCsY4","    // Run `cms:update` task every minute\n",[428,1066,1067,1070,1073,1076],{"class":430,"line":491},[428,1068,1069],{"class":445},"    '* * * * *'",[428,1071,1072],{"class":438},": [",[428,1074,1075],{"class":445},"'cms:update'",[428,1077,1078],{"class":438},"],\n",[428,1080,1081],{"class":430,"line":497},[428,1082,1083],{"class":1063},"    // Run a single task (string shorthand)\n",[428,1085,1086,1089,1092],{"class":430,"line":620},[428,1087,1088],{"class":445},"    '0 * * * *'",[428,1090,1091],{"class":438},": ",[428,1093,1094],{"class":445},"'db:cleanup'\n",[428,1096,1097],{"class":430,"line":635},[428,1098,494],{"class":438},[428,1100,1101],{"class":430,"line":640},[428,1102,500],{"class":438},[403,1104,651,1105,1108],{},[425,1106,1107],{},"scheduledTasks"," config maps cron expressions to either a single task name (string) or an array of task names. When multiple tasks are assigned to the same cron expression, they run in parallel.",[1110,1111,1112],"tip",{},[403,1113,1114,1115,1120],{},"\nYou can use ",[407,1116,1119],{"href":1117,"rel":1118},"https://crontab.guru/",[411],"crontab.guru"," to easily generate and understand cron tab patterns.",[403,1122,1123,1124,1126,1127,1130,1131,1134],{},"When a scheduled task runs, it automatically receives a ",[425,1125,591],{}," with ",[425,1128,1129],{},"scheduledTime"," set to the current timestamp (",[425,1132,1133],{},"Date.now()",").",[645,1136,1138],{"id":1137},"platform-support","Platform support",[657,1140,1141,1180,1199,1221],{},[660,1142,1143,594,1148,594,1153,594,1158,594,1163,671,1168,1173,1174,1179],{},[530,1144,1145],{},[425,1146,1147],{},"dev",[530,1149,1150],{},[425,1151,1152],{},"node_server",[530,1154,1155],{},[425,1156,1157],{},"node_cluster",[530,1159,1160],{},[425,1161,1162],{},"node_middleware",[530,1164,1165],{},[425,1166,1167],{},"bun",[530,1169,1170],{},[425,1171,1172],{},"deno_server"," presets are supported with the ",[407,1175,1178],{"href":1176,"rel":1177},"https://croner.56k.guru/",[411],"croner"," engine.",[660,1181,1182,671,1187,1192,1193,1198],{},[530,1183,1184],{},[425,1185,1186],{},"cloudflare_module",[530,1188,1189],{},[425,1190,1191],{},"cloudflare_pages"," presets have native integration with ",[407,1194,1197],{"href":1195,"rel":1196},"https://developers.cloudflare.com/workers/configuration/cron-triggers/",[411],"Cron Triggers",". Nitro automatically generates the cron triggers in the wrangler config at build time - no manual wrangler setup required.",[660,1200,1201,1206,1207,1212,1213,1216,1217,1220],{},[530,1202,1203],{},[425,1204,1205],{},"vercel"," preset has native integration with ",[407,1208,1211],{"href":1209,"rel":1210},"https://vercel.com/docs/cron-jobs",[411],"Vercel Cron Jobs",". Nitro automatically generates the cron job configuration at build time - no manual ",[425,1214,1215],{},"vercel.json"," setup required. You can secure cron endpoints by setting the ",[425,1218,1219],{},"CRON_SECRET"," environment variable.",[660,1222,1223],{},"More presets (with native primitives support) are planned to be supported!",[395,1225,1227],{"id":1226},"waituntil",[425,1228,851],{},[403,1230,1231],{},"When running background tasks, you might want to make sure the server or worker waits until the task is done.",[403,1233,1234,1235,1238,1239,1243],{},"An optional ",[425,1236,1237],{},"context.waitUntil"," function ",[1240,1241,1242],"em",{},"might"," be available depending on the runtime.",[418,1245,1247],{"className":420,"code":1246,"language":423,"meta":5,"style":5},"export default defineTask({\n  run({ context }) {\n    const promise = fetch(...)\n    context.waitUntil?.(promise);\n    await promise;\n    return { result: \"Success\" };\n  },\n});\n",[425,1248,1249,1259,1269,1290,1300,1308,1318,1322],{"__ignoreMap":5},[428,1250,1251,1253,1255,1257],{"class":430,"line":431},[428,1252,462],{"class":434},[428,1254,465],{"class":434},[428,1256,546],{"class":468},[428,1258,472],{"class":438},[428,1260,1261,1263,1265,1267],{"class":430,"line":452},[428,1262,584],{"class":468},[428,1264,587],{"class":438},[428,1266,597],{"class":590},[428,1268,600],{"class":438},[428,1270,1271,1274,1277,1279,1282,1284,1287],{"class":430,"line":459},[428,1272,1273],{"class":434},"    const",[428,1275,1276],{"class":487}," promise",[428,1278,716],{"class":434},[428,1280,1281],{"class":468}," fetch",[428,1283,611],{"class":438},[428,1285,1286],{"class":434},"...",[428,1288,1289],{"class":438},")\n",[428,1291,1292,1295,1297],{"class":430,"line":475},[428,1293,1294],{"class":438},"    context.",[428,1296,851],{"class":468},[428,1298,1299],{"class":438},"?.(promise);\n",[428,1301,1302,1305],{"class":430,"line":481},[428,1303,1304],{"class":434},"    await",[428,1306,1307],{"class":438}," promise;\n",[428,1309,1310,1312,1314,1316],{"class":430,"line":491},[428,1311,623],{"class":434},[428,1313,626],{"class":438},[428,1315,629],{"class":445},[428,1317,632],{"class":438},[428,1319,1320],{"class":430,"line":497},[428,1321,579],{"class":438},[428,1323,1324],{"class":430,"line":620},[428,1325,643],{"class":438},[395,1327,1329],{"id":1328},"programmatically-run-tasks","Programmatically run tasks",[403,1331,1332,1333,1336,1337,1340],{},"To manually run tasks, you can use ",[425,1334,1335],{},"runTask(name, { payload?, context? })"," utility from ",[425,1338,1339],{},"nitro/task",".",[403,1342,1343],{},[530,1344,532],{},[418,1346,1349],{"className":420,"code":1347,"filename":1348,"language":423,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(async (event) => {\n  // IMPORTANT: Authenticate user and validate payload!\n  const payload = Object.fromEntries(event.url.searchParams);\n  const { result } = await runTask(\"db:migrate\", { payload });\n\n  return { result };\n});\n","api/migrate.ts",[425,1350,1351,1364,1368,1395,1400,1419,1445,1449,1457],{"__ignoreMap":5},[428,1352,1353,1355,1358,1360,1362],{"class":430,"line":431},[428,1354,435],{"class":434},[428,1356,1357],{"class":438}," { defineHandler } ",[428,1359,442],{"class":434},[428,1361,446],{"class":445},[428,1363,449],{"class":438},[428,1365,1366],{"class":430,"line":452},[428,1367,456],{"emptyLinePlaceholder":455},[428,1369,1370,1372,1374,1377,1379,1382,1385,1387,1390,1393],{"class":430,"line":459},[428,1371,462],{"class":434},[428,1373,465],{"class":434},[428,1375,1376],{"class":468}," defineHandler",[428,1378,611],{"class":438},[428,1380,1381],{"class":434},"async",[428,1383,1384],{"class":438}," (",[428,1386,760],{"class":590},[428,1388,1389],{"class":438},") ",[428,1391,1392],{"class":434},"=>",[428,1394,866],{"class":438},[428,1396,1397],{"class":430,"line":475},[428,1398,1399],{"class":1063},"  // IMPORTANT: Authenticate user and validate payload!\n",[428,1401,1402,1405,1408,1410,1413,1416],{"class":430,"line":481},[428,1403,1404],{"class":434},"  const",[428,1406,1407],{"class":487}," payload",[428,1409,716],{"class":434},[428,1411,1412],{"class":438}," Object.",[428,1414,1415],{"class":468},"fromEntries",[428,1417,1418],{"class":438},"(event.url.searchParams);\n",[428,1420,1421,1423,1425,1427,1429,1432,1435,1438,1440,1442],{"class":430,"line":491},[428,1422,1404],{"class":434},[428,1424,733],{"class":438},[428,1426,693],{"class":487},[428,1428,781],{"class":438},[428,1430,1431],{"class":434},"=",[428,1433,1434],{"class":434}," await",[428,1436,1437],{"class":468}," runTask",[428,1439,611],{"class":438},[428,1441,561],{"class":445},[428,1443,1444],{"class":438},", { payload });\n",[428,1446,1447],{"class":430,"line":497},[428,1448,456],{"emptyLinePlaceholder":455},[428,1450,1451,1454],{"class":430,"line":620},[428,1452,1453],{"class":434},"  return",[428,1455,1456],{"class":438}," { result };\n",[428,1458,1459],{"class":430,"line":635},[428,1460,643],{"class":438},[645,1462,1464],{"id":1463},"error-handling","Error handling",[403,1466,1467,1470],{},[425,1468,1469],{},"runTask"," throws an HTTP error if:",[657,1472,1473,1479],{},[660,1474,1475,1476,1134],{},"The task does not exist (status ",[425,1477,1478],{},"404",[660,1480,1481,1482,1134],{},"The task has no handler implementation (status ",[425,1483,1484],{},"501",[403,1486,1487,1488,1490],{},"Any errors thrown inside the task's ",[425,1489,682],{}," function will propagate to the caller.",[395,1492,1494],{"id":1493},"run-tasks-with-dev-server","Run tasks with dev server",[403,1496,1497],{},"Nitro's built-in dev server exposes tasks to be easily executed without programmatic usage.",[645,1499,1501],{"id":1500},"using-api-routes","Using API routes",[1503,1504,1506],"h4",{"id":1505},"_nitrotasks",[425,1507,1508],{},"/_nitro/tasks",[403,1510,1511],{},"This endpoint returns a list of available task names and their meta.",[418,1513,1517],{"className":1514,"code":1515,"language":1516,"meta":5,"style":5},"language-json shiki shiki-themes github-light github-dark github-dark","// [GET] /_nitro/tasks\n{\n  \"tasks\": {\n    \"db:migrate\": {\n      \"description\": \"Run database migrations\"\n    },\n     \"cms:update\": {\n      \"description\": \"Update CMS content\"\n    }\n  },\n  \"scheduledTasks\": [\n    {\n      \"cron\": \"* * * * *\",\n      \"tasks\": [\n        \"cms:update\"\n      ]\n    }\n  ]\n}\n","json",[425,1518,1519,1524,1529,1536,1542,1551,1556,1563,1572,1576,1580,1588,1593,1605,1613,1619,1625,1630,1636],{"__ignoreMap":5},[428,1520,1521],{"class":430,"line":431},[428,1522,1523],{"class":1063},"// [GET] /_nitro/tasks\n",[428,1525,1526],{"class":430,"line":452},[428,1527,1528],{"class":438},"{\n",[428,1530,1531,1534],{"class":430,"line":459},[428,1532,1533],{"class":487},"  \"tasks\"",[428,1535,970],{"class":438},[428,1537,1538,1540],{"class":430,"line":475},[428,1539,967],{"class":487},[428,1541,970],{"class":438},[428,1543,1544,1547,1549],{"class":430,"line":481},[428,1545,1546],{"class":487},"      \"description\"",[428,1548,1091],{"class":438},[428,1550,988],{"class":445},[428,1552,1553],{"class":430,"line":491},[428,1554,1555],{"class":438},"    },\n",[428,1557,1558,1561],{"class":430,"line":497},[428,1559,1560],{"class":487},"     \"cms:update\"",[428,1562,970],{"class":438},[428,1564,1565,1567,1569],{"class":430,"line":620},[428,1566,1546],{"class":487},[428,1568,1091],{"class":438},[428,1570,1571],{"class":445},"\"Update CMS content\"\n",[428,1573,1574],{"class":430,"line":635},[428,1575,994],{"class":438},[428,1577,1578],{"class":430,"line":640},[428,1579,579],{"class":438},[428,1581,1582,1585],{"class":430,"line":991},[428,1583,1584],{"class":487},"  \"scheduledTasks\"",[428,1586,1587],{"class":438},": [\n",[428,1589,1590],{"class":430,"line":997},[428,1591,1592],{"class":438},"    {\n",[428,1594,1595,1598,1600,1603],{"class":430,"line":1002},[428,1596,1597],{"class":487},"      \"cron\"",[428,1599,1091],{"class":438},[428,1601,1602],{"class":445},"\"* * * * *\"",[428,1604,564],{"class":438},[428,1606,1608,1611],{"class":430,"line":1607},14,[428,1609,1610],{"class":487},"      \"tasks\"",[428,1612,1587],{"class":438},[428,1614,1616],{"class":430,"line":1615},15,[428,1617,1618],{"class":445},"        \"cms:update\"\n",[428,1620,1622],{"class":430,"line":1621},16,[428,1623,1624],{"class":438},"      ]\n",[428,1626,1628],{"class":430,"line":1627},17,[428,1629,994],{"class":438},[428,1631,1633],{"class":430,"line":1632},18,[428,1634,1635],{"class":438},"  ]\n",[428,1637,1639],{"class":430,"line":1638},19,[428,1640,804],{"class":438},[1503,1642,1644],{"id":1643},"_nitrotasksname",[425,1645,1646],{},"/_nitro/tasks/:name",[403,1648,1649,1650,694],{},"This endpoint executes a task. You can provide a payload using both query parameters and body JSON payload. The payload sent in the JSON body payload must be under the ",[425,1651,1652],{},"\"payload\"",[1654,1655,1656,1740,1789],"code-group",{},[418,1657,1660],{"className":420,"code":1658,"filename":1659,"language":423,"meta":5,"style":5},"export default defineTask({\n  meta: {\n    name: \"echo:payload\",\n    description: \"Returns the provided payload\",\n  },\n  run({ payload, context }) {\n    console.log(\"Running echo task...\");\n    return { result: payload };\n  },\n});\n","tasks/echo/payload.ts",[425,1661,1662,1672,1676,1685,1694,1698,1712,1725,1732,1736],{"__ignoreMap":5},[428,1663,1664,1666,1668,1670],{"class":430,"line":431},[428,1665,462],{"class":434},[428,1667,465],{"class":434},[428,1669,546],{"class":468},[428,1671,472],{"class":438},[428,1673,1674],{"class":430,"line":452},[428,1675,553],{"class":438},[428,1677,1678,1680,1683],{"class":430,"line":459},[428,1679,558],{"class":438},[428,1681,1682],{"class":445},"\"echo:payload\"",[428,1684,564],{"class":438},[428,1686,1687,1689,1692],{"class":430,"line":475},[428,1688,569],{"class":438},[428,1690,1691],{"class":445},"\"Returns the provided payload\"",[428,1693,564],{"class":438},[428,1695,1696],{"class":430,"line":481},[428,1697,579],{"class":438},[428,1699,1700,1702,1704,1706,1708,1710],{"class":430,"line":491},[428,1701,584],{"class":468},[428,1703,587],{"class":438},[428,1705,591],{"class":590},[428,1707,594],{"class":438},[428,1709,597],{"class":590},[428,1711,600],{"class":438},[428,1713,1714,1716,1718,1720,1723],{"class":430,"line":497},[428,1715,605],{"class":438},[428,1717,608],{"class":468},[428,1719,611],{"class":438},[428,1721,1722],{"class":445},"\"Running echo task...\"",[428,1724,617],{"class":438},[428,1726,1727,1729],{"class":430,"line":620},[428,1728,623],{"class":434},[428,1730,1731],{"class":438}," { result: payload };\n",[428,1733,1734],{"class":430,"line":635},[428,1735,579],{"class":438},[428,1737,1738],{"class":430,"line":640},[428,1739,643],{"class":438},[418,1741,1744],{"className":1514,"code":1742,"filename":1743,"language":1516,"meta":5,"style":5},"// [GET] /_nitro/tasks/echo:payload?field=value&array=1&array=2\n{\n  \"field\": \"value\",\n  \"array\": [\"1\", \"2\"]\n}\n","GET",[425,1745,1746,1751,1755,1767,1785],{"__ignoreMap":5},[428,1747,1748],{"class":430,"line":431},[428,1749,1750],{"class":1063},"// [GET] /_nitro/tasks/echo:payload?field=value&array=1&array=2\n",[428,1752,1753],{"class":430,"line":452},[428,1754,1528],{"class":438},[428,1756,1757,1760,1762,1765],{"class":430,"line":459},[428,1758,1759],{"class":487},"  \"field\"",[428,1761,1091],{"class":438},[428,1763,1764],{"class":445},"\"value\"",[428,1766,564],{"class":438},[428,1768,1769,1772,1774,1777,1779,1782],{"class":430,"line":475},[428,1770,1771],{"class":487},"  \"array\"",[428,1773,1072],{"class":438},[428,1775,1776],{"class":445},"\"1\"",[428,1778,594],{"class":438},[428,1780,1781],{"class":445},"\"2\"",[428,1783,1784],{"class":438},"]\n",[428,1786,1787],{"class":430,"line":481},[428,1788,804],{"class":438},[418,1790,1793],{"className":1514,"code":1791,"filename":1792,"language":1516,"meta":5,"style":5},"/**\n * [POST] /_nitro/tasks/echo:payload?field=value\n * body: {\n *   \"payload\": {\n *     \"answer\": 42,\n *     \"nested\": {\n *       \"value\": true\n *     }\n *   }\n * }\n */\n{\n  \"field\": \"value\",\n  \"answer\": 42,\n  \"nested\": {\n    \"value\": true\n  }\n}\n","POST",[425,1794,1795,1800,1805,1810,1815,1820,1825,1830,1835,1840,1845,1850,1854,1864,1876,1883,1892,1896],{"__ignoreMap":5},[428,1796,1797],{"class":430,"line":431},[428,1798,1799],{"class":1063},"/**\n",[428,1801,1802],{"class":430,"line":452},[428,1803,1804],{"class":1063}," * [POST] /_nitro/tasks/echo:payload?field=value\n",[428,1806,1807],{"class":430,"line":459},[428,1808,1809],{"class":1063}," * body: {\n",[428,1811,1812],{"class":430,"line":475},[428,1813,1814],{"class":1063}," *   \"payload\": {\n",[428,1816,1817],{"class":430,"line":481},[428,1818,1819],{"class":1063}," *     \"answer\": 42,\n",[428,1821,1822],{"class":430,"line":491},[428,1823,1824],{"class":1063}," *     \"nested\": {\n",[428,1826,1827],{"class":430,"line":497},[428,1828,1829],{"class":1063}," *       \"value\": true\n",[428,1831,1832],{"class":430,"line":620},[428,1833,1834],{"class":1063}," *     }\n",[428,1836,1837],{"class":430,"line":635},[428,1838,1839],{"class":1063}," *   }\n",[428,1841,1842],{"class":430,"line":640},[428,1843,1844],{"class":1063}," * }\n",[428,1846,1847],{"class":430,"line":991},[428,1848,1849],{"class":1063}," */\n",[428,1851,1852],{"class":430,"line":997},[428,1853,1528],{"class":438},[428,1855,1856,1858,1860,1862],{"class":430,"line":1002},[428,1857,1759],{"class":487},[428,1859,1091],{"class":438},[428,1861,1764],{"class":445},[428,1863,564],{"class":438},[428,1865,1866,1869,1871,1874],{"class":430,"line":1607},[428,1867,1868],{"class":487},"  \"answer\"",[428,1870,1091],{"class":438},[428,1872,1873],{"class":487},"42",[428,1875,564],{"class":438},[428,1877,1878,1881],{"class":430,"line":1615},[428,1879,1880],{"class":487},"  \"nested\"",[428,1882,970],{"class":438},[428,1884,1885,1888,1890],{"class":430,"line":1621},[428,1886,1887],{"class":487},"    \"value\"",[428,1889,1091],{"class":438},[428,1891,488],{"class":487},[428,1893,1894],{"class":430,"line":1627},[428,1895,494],{"class":438},[428,1897,1898],{"class":430,"line":1632},[428,1899,804],{"class":438},[1901,1902,1903],"note",{},[403,1904,1905],{},"\nThe JSON payload included in the body will overwrite the keys present in the query params.",[645,1907,1909],{"id":1908},"using-cli","Using CLI",[400,1911,1912],{},[403,1913,1914,1915,1918],{},"\nIt is only possible to run these commands while the ",[530,1916,1917],{},"dev server is running",". You should run them in a second terminal.",[1503,1920,1922],{"id":1921},"list-tasks","List tasks",[418,1924,1928],{"className":1925,"code":1926,"language":1927,"meta":5,"style":5},"language-sh shiki shiki-themes github-light github-dark github-dark","nitro task list\n","sh",[425,1929,1930],{"__ignoreMap":5},[428,1931,1932,1935,1938],{"class":430,"line":431},[428,1933,1934],{"class":468},"nitro",[428,1936,1937],{"class":445}," task",[428,1939,1940],{"class":445}," list\n",[1503,1942,1944],{"id":1943},"run-a-task","Run a task",[418,1946,1948],{"className":1925,"code":1947,"language":1927,"meta":5,"style":5},"nitro task run db:migrate --payload \"{}\"\n",[425,1949,1950],{"__ignoreMap":5},[428,1951,1952,1954,1956,1959,1962,1965],{"class":430,"line":431},[428,1953,1934],{"class":468},[428,1955,1937],{"class":445},[428,1957,1958],{"class":445}," run",[428,1960,1961],{"class":445}," db:migrate",[428,1963,1964],{"class":487}," --payload",[428,1966,1967],{"class":445}," \"{}\"\n",[403,1969,651,1970,1973],{},[425,1971,1972],{},"--payload"," flag accepts a JSON string that will be parsed and passed to the task. If the value is not a valid JSON object, the task runs without a payload.",[395,1975,1977],{"id":1976},"notes","Notes",[645,1979,1981],{"id":1980},"concurrency","Concurrency",[403,1983,1984,1985,1988],{},"Each task can have ",[530,1986,1987],{},"one running instance",". Calling a task of same name multiple times in parallel, results in calling it once and all callers will get the same return value.",[1901,1990,1991],{},[403,1992,1993],{},"\nNitro tasks can be running multiple times and in parallel.",[1995,1996,1997],"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 pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}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}",{"title":5,"searchDepth":452,"depth":452,"links":1999},[2000,2001,2006,2009,2010,2013,2017],{"id":397,"depth":452,"text":398},{"id":503,"depth":452,"text":504,"children":2002},[2003,2004,2005],{"id":647,"depth":459,"text":648},{"id":807,"depth":459,"text":689},{"id":908,"depth":459,"text":909},{"id":1018,"depth":452,"text":1019,"children":2007},[2008],{"id":1137,"depth":459,"text":1138},{"id":1226,"depth":452,"text":851},{"id":1328,"depth":452,"text":1329,"children":2011},[2012],{"id":1463,"depth":459,"text":1464},{"id":1493,"depth":452,"text":1494,"children":2014},[2015,2016],{"id":1500,"depth":459,"text":1501},{"id":1908,"depth":459,"text":1909},{"id":1976,"depth":452,"text":1977,"children":2018},[2019],{"id":1980,"depth":459,"text":1981},"Nitro tasks allow on-off operations in runtime.","md",{"icon":56},{"icon":56},{"title":53,"description":2020},"3jQ3dnDLUDKaMT1X1oE0c6YFmJxcm80KqW4e_xxwe80",[2027,2029],{"title":48,"path":49,"stem":50,"description":2028,"icon":51,"children":-1},"Use plugins to extend Nitro's runtime behavior.",{"title":58,"path":59,"stem":60,"description":2030,"icon":61,"children":-1},"Use a server entry to create a global middleware that runs for all routes before they are matched.",1775838241485]