[{"data":1,"prerenderedAt":2020},["ShallowReactive",2],{"navigation":3,"-docs-tasks":377,"-docs-tasks-surround":2015},[4,83,212,218,374],{"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":5,"path":375,"stem":376},"/","index",{"id":378,"title":53,"body":379,"description":2009,"extension":2010,"meta":2011,"navigation":2012,"path":54,"seo":2013,"stem":55,"__hash__":2014},"content/1.docs/50.tasks.md",{"type":380,"value":381,"toc":1987,"icon":56},"minimark",[382,387,402,405,489,493,500,515,521,632,637,644,683,793,798,806,841,894,898,901,993,1004,1008,1011,1091,1097,1109,1123,1127,1212,1217,1220,1232,1314,1318,1329,1333,1450,1454,1460,1474,1480,1484,1487,1491,1498,1501,1630,1636,1642,1889,1895,1899,1908,1912,1930,1934,1957,1963,1967,1971,1978,1983],[383,384,386],"h2",{"id":385},"opt-in-to-the-experimental-feature","Opt-in to the experimental feature",[388,389,390],"important",{},[391,392,393,394,401],"p",{},"\nTasks support is currently experimental.\nSee ",[395,396,400],"a",{"href":397,"rel":398},"https://github.com/nitrojs/nitro/issues/1974",[399],"nofollow","nitrojs/nitro#1974"," for the relevant discussion.",[391,403,404],{},"In order to use the tasks API you need to enable experimental feature flag.",[406,407,412],"pre",{"className":408,"code":409,"filename":410,"language":411,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\n  experimental: {\n    tasks: true\n  }\n})\n","nitro.config.ts","ts",[413,414,415,438,445,461,467,477,483],"code",{"__ignoreMap":5},[416,417,420,424,428,431,435],"span",{"class":418,"line":419},"line",1,[416,421,423],{"class":422},"so5gQ","import",[416,425,427],{"class":426},"slsVL"," { defineNitroConfig } ",[416,429,430],{"class":422},"from",[416,432,434],{"class":433},"sfrk1"," \"nitro/config\"",[416,436,437],{"class":426},";\n",[416,439,441],{"class":418,"line":440},2,[416,442,444],{"emptyLinePlaceholder":443},true,"\n",[416,446,448,451,454,458],{"class":418,"line":447},3,[416,449,450],{"class":422},"export",[416,452,453],{"class":422}," default",[416,455,457],{"class":456},"shcOC"," defineNitroConfig",[416,459,460],{"class":426},"({\n",[416,462,464],{"class":418,"line":463},4,[416,465,466],{"class":426},"  experimental: {\n",[416,468,470,473],{"class":418,"line":469},5,[416,471,472],{"class":426},"    tasks: ",[416,474,476],{"class":475},"suiK_","true\n",[416,478,480],{"class":418,"line":479},6,[416,481,482],{"class":426},"  }\n",[416,484,486],{"class":418,"line":485},7,[416,487,488],{"class":426},"})\n",[383,490,492],{"id":491},"define-tasks","Define tasks",[391,494,495,496,499],{},"Tasks can be defined in ",[413,497,498],{},"tasks/[name].ts"," files.",[391,501,502,503,506,507,510,511,514],{},"Nested directories are supported. The task name will be joined with ",[413,504,505],{},":",". (Example: ",[413,508,509],{},"tasks/db/migrate.ts"," task name will be ",[413,512,513],{},"db:migrate",")",[391,516,517],{},[518,519,520],"strong",{},"Example:",[406,522,524],{"className":408,"code":523,"filename":509,"language":411,"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",[413,525,526,537,542,553,563,568,589,606,621,626],{"__ignoreMap":5},[416,527,528,530,532,535],{"class":418,"line":419},[416,529,450],{"class":422},[416,531,453],{"class":422},[416,533,534],{"class":456}," defineTask",[416,536,460],{"class":426},[416,538,539],{"class":418,"line":440},[416,540,541],{"class":426},"  meta: {\n",[416,543,544,547,550],{"class":418,"line":447},[416,545,546],{"class":426},"    name: ",[416,548,549],{"class":433},"\"db:migrate\"",[416,551,552],{"class":426},",\n",[416,554,555,558,561],{"class":418,"line":463},[416,556,557],{"class":426},"    description: ",[416,559,560],{"class":433},"\"Run database migrations\"",[416,562,552],{"class":426},[416,564,565],{"class":418,"line":469},[416,566,567],{"class":426},"  },\n",[416,569,570,573,576,580,583,586],{"class":418,"line":479},[416,571,572],{"class":456},"  run",[416,574,575],{"class":426},"({ ",[416,577,579],{"class":578},"sQHwn","payload",[416,581,582],{"class":426},", ",[416,584,585],{"class":578},"context",[416,587,588],{"class":426}," }) {\n",[416,590,591,594,597,600,603],{"class":418,"line":485},[416,592,593],{"class":426},"    console.",[416,595,596],{"class":456},"log",[416,598,599],{"class":426},"(",[416,601,602],{"class":433},"\"Running DB migration task...\"",[416,604,605],{"class":426},");\n",[416,607,609,612,615,618],{"class":418,"line":608},8,[416,610,611],{"class":422},"    return",[416,613,614],{"class":426}," { result: ",[416,616,617],{"class":433},"\"Success\"",[416,619,620],{"class":426}," };\n",[416,622,624],{"class":418,"line":623},9,[416,625,567],{"class":426},[416,627,629],{"class":418,"line":628},10,[416,630,631],{"class":426},"});\n",[633,634,636],"h3",{"id":635},"task-interface","Task interface",[391,638,639,640,643],{},"The ",[413,641,642],{},"defineTask"," helper accepts an object with the following properties:",[645,646,647,664],"ul",{},[648,649,650,655,656,659,660,663],"li",{},[518,651,652],{},[413,653,654],{},"meta"," (optional): An object with optional ",[413,657,658],{},"name"," and ",[413,661,662],{},"description"," string fields used for display in the dev server and CLI.",[648,665,666,671,672,678,679,682],{},[518,667,668],{},[413,669,670],{},"run"," (required): A function that receives a ",[395,673,675],{"href":674},"#taskevent",[413,676,677],{},"TaskEvent"," and returns (or resolves to) an object with an optional ",[413,680,681],{},"result"," property.",[406,684,686],{"className":408,"code":685,"language":411,"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",[413,687,688,711,740,788],{"__ignoreMap":5},[416,689,690,693,696,699,702,705,708],{"class":418,"line":419},[416,691,692],{"class":422},"interface",[416,694,695],{"class":456}," Task",[416,697,698],{"class":426},"\u003C",[416,700,701],{"class":456},"RT",[416,703,704],{"class":422}," =",[416,706,707],{"class":475}," unknown",[416,709,710],{"class":426},"> {\n",[416,712,713,716,719,722,724,726,729,732,734,736,738],{"class":418,"line":440},[416,714,715],{"class":578},"  meta",[416,717,718],{"class":422},"?:",[416,720,721],{"class":426}," { ",[416,723,658],{"class":578},[416,725,718],{"class":422},[416,727,728],{"class":475}," string",[416,730,731],{"class":426},"; ",[416,733,662],{"class":578},[416,735,718],{"class":422},[416,737,728],{"class":475},[416,739,620],{"class":426},[416,741,742,744,746,749,751,754,756,758,760,762,764,767,770,773,776,779,781,783,785],{"class":418,"line":447},[416,743,572],{"class":456},[416,745,599],{"class":426},[416,747,748],{"class":578},"event",[416,750,505],{"class":422},[416,752,753],{"class":456}," TaskEvent",[416,755,514],{"class":426},[416,757,505],{"class":422},[416,759,721],{"class":426},[416,761,681],{"class":578},[416,763,718],{"class":422},[416,765,766],{"class":456}," RT",[416,768,769],{"class":426}," } ",[416,771,772],{"class":422},"|",[416,774,775],{"class":456}," Promise",[416,777,778],{"class":426},"\u003C{ ",[416,780,681],{"class":578},[416,782,718],{"class":422},[416,784,766],{"class":456},[416,786,787],{"class":426}," }>;\n",[416,789,790],{"class":418,"line":463},[416,791,792],{"class":426},"}\n",[633,794,796],{"id":795},"taskevent",[413,797,677],{},[391,799,639,800,802,803,805],{},[413,801,670],{}," function receives a ",[413,804,677],{}," object with the following properties:",[645,807,808,815,826],{},[648,809,810,814],{},[518,811,812],{},[413,813,658],{},": The name of the task being executed.",[648,816,817,821,822,825],{},[518,818,819],{},[413,820,579],{},": An object (",[413,823,824],{},"Record\u003Cstring, unknown>",") containing any data passed to the task.",[648,827,828,832,833,836,837,840],{},[518,829,830],{},[413,831,585],{},": A ",[413,834,835],{},"TaskContext"," object (may include ",[413,838,839],{},"waitUntil"," depending on the runtime).",[406,842,844],{"className":408,"code":843,"language":411,"meta":5,"style":5},"interface TaskEvent {\n  name: string;\n  payload: TaskPayload;\n  context: TaskContext;\n}\n",[413,845,846,855,866,878,890],{"__ignoreMap":5},[416,847,848,850,852],{"class":418,"line":419},[416,849,692],{"class":422},[416,851,753],{"class":456},[416,853,854],{"class":426}," {\n",[416,856,857,860,862,864],{"class":418,"line":440},[416,858,859],{"class":578},"  name",[416,861,505],{"class":422},[416,863,728],{"class":475},[416,865,437],{"class":426},[416,867,868,871,873,876],{"class":418,"line":447},[416,869,870],{"class":578},"  payload",[416,872,505],{"class":422},[416,874,875],{"class":456}," TaskPayload",[416,877,437],{"class":426},[416,879,880,883,885,888],{"class":418,"line":463},[416,881,882],{"class":578},"  context",[416,884,505],{"class":422},[416,886,887],{"class":456}," TaskContext",[416,889,437],{"class":426},[416,891,892],{"class":418,"line":469},[416,893,792],{"class":426},[633,895,897],{"id":896},"registering-tasks-via-config","Registering tasks via config",[391,899,900],{},"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.",[406,902,904],{"className":408,"code":903,"filename":410,"language":411,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\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",[413,905,906,918,922,932,936,942,946,951,959,969,977,983,988],{"__ignoreMap":5},[416,907,908,910,912,914,916],{"class":418,"line":419},[416,909,423],{"class":422},[416,911,427],{"class":426},[416,913,430],{"class":422},[416,915,434],{"class":433},[416,917,437],{"class":426},[416,919,920],{"class":418,"line":440},[416,921,444],{"emptyLinePlaceholder":443},[416,923,924,926,928,930],{"class":418,"line":447},[416,925,450],{"class":422},[416,927,453],{"class":422},[416,929,457],{"class":456},[416,931,460],{"class":426},[416,933,934],{"class":418,"line":463},[416,935,466],{"class":426},[416,937,938,940],{"class":418,"line":469},[416,939,472],{"class":426},[416,941,476],{"class":475},[416,943,944],{"class":418,"line":479},[416,945,567],{"class":426},[416,947,948],{"class":418,"line":485},[416,949,950],{"class":426},"  tasks: {\n",[416,952,953,956],{"class":418,"line":608},[416,954,955],{"class":433},"    \"db:migrate\"",[416,957,958],{"class":426},": {\n",[416,960,961,964,967],{"class":418,"line":623},[416,962,963],{"class":426},"      handler: ",[416,965,966],{"class":433},"\"./tasks/custom-migrate.ts\"",[416,968,552],{"class":426},[416,970,971,974],{"class":418,"line":628},[416,972,973],{"class":426},"      description: ",[416,975,976],{"class":433},"\"Run database migrations\"\n",[416,978,980],{"class":418,"line":979},11,[416,981,982],{"class":426},"    }\n",[416,984,986],{"class":418,"line":985},12,[416,987,482],{"class":426},[416,989,991],{"class":418,"line":990},13,[416,992,488],{"class":426},[391,994,995,996,999,1000,1003],{},"If a task is both scanned from the ",[413,997,998],{},"tasks/"," directory and defined in the config, the config-defined ",[413,1001,1002],{},"handler"," takes precedence.",[383,1005,1007],{"id":1006},"scheduled-tasks","Scheduled tasks",[391,1009,1010],{},"You can define scheduled tasks using Nitro configuration to automatically run after each period of time.",[406,1012,1014],{"className":408,"code":1013,"filename":410,"language":411,"meta":5,"style":5},"import { defineNitroConfig } from \"nitro/config\";\n\nexport default defineNitroConfig({\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",[413,1015,1016,1028,1032,1042,1047,1053,1067,1072,1083,1087],{"__ignoreMap":5},[416,1017,1018,1020,1022,1024,1026],{"class":418,"line":419},[416,1019,423],{"class":422},[416,1021,427],{"class":426},[416,1023,430],{"class":422},[416,1025,434],{"class":433},[416,1027,437],{"class":426},[416,1029,1030],{"class":418,"line":440},[416,1031,444],{"emptyLinePlaceholder":443},[416,1033,1034,1036,1038,1040],{"class":418,"line":447},[416,1035,450],{"class":422},[416,1037,453],{"class":422},[416,1039,457],{"class":456},[416,1041,460],{"class":426},[416,1043,1044],{"class":418,"line":463},[416,1045,1046],{"class":426},"  scheduledTasks: {\n",[416,1048,1049],{"class":418,"line":469},[416,1050,1052],{"class":1051},"sCsY4","    // Run `cms:update` task every minute\n",[416,1054,1055,1058,1061,1064],{"class":418,"line":479},[416,1056,1057],{"class":433},"    '* * * * *'",[416,1059,1060],{"class":426},": [",[416,1062,1063],{"class":433},"'cms:update'",[416,1065,1066],{"class":426},"],\n",[416,1068,1069],{"class":418,"line":485},[416,1070,1071],{"class":1051},"    // Run a single task (string shorthand)\n",[416,1073,1074,1077,1080],{"class":418,"line":608},[416,1075,1076],{"class":433},"    '0 * * * *'",[416,1078,1079],{"class":426},": ",[416,1081,1082],{"class":433},"'db:cleanup'\n",[416,1084,1085],{"class":418,"line":623},[416,1086,482],{"class":426},[416,1088,1089],{"class":418,"line":628},[416,1090,488],{"class":426},[391,1092,639,1093,1096],{},[413,1094,1095],{},"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.",[1098,1099,1100],"tip",{},[391,1101,1102,1103,1108],{},"\nYou can use ",[395,1104,1107],{"href":1105,"rel":1106},"https://crontab.guru/",[399],"crontab.guru"," to easily generate and understand cron tab patterns.",[391,1110,1111,1112,1114,1115,1118,1119,1122],{},"When a scheduled task runs, it automatically receives a ",[413,1113,579],{}," with ",[413,1116,1117],{},"scheduledTime"," set to the current timestamp (",[413,1120,1121],{},"Date.now()",").",[633,1124,1126],{"id":1125},"platform-support","Platform support",[645,1128,1129,1168,1187,1209],{},[648,1130,1131,582,1136,582,1141,582,1146,582,1151,659,1156,1161,1162,1167],{},[518,1132,1133],{},[413,1134,1135],{},"dev",[518,1137,1138],{},[413,1139,1140],{},"node_server",[518,1142,1143],{},[413,1144,1145],{},"node_cluster",[518,1147,1148],{},[413,1149,1150],{},"node_middleware",[518,1152,1153],{},[413,1154,1155],{},"bun",[518,1157,1158],{},[413,1159,1160],{},"deno_server"," presets are supported with the ",[395,1163,1166],{"href":1164,"rel":1165},"https://croner.56k.guru/",[399],"croner"," engine.",[648,1169,1170,659,1175,1180,1181,1186],{},[518,1171,1172],{},[413,1173,1174],{},"cloudflare_module",[518,1176,1177],{},[413,1178,1179],{},"cloudflare_pages"," presets have native integration with ",[395,1182,1185],{"href":1183,"rel":1184},"https://developers.cloudflare.com/workers/configuration/cron-triggers/",[399],"Cron Triggers",". Nitro automatically generates the cron triggers in the wrangler config at build time - no manual wrangler setup required.",[648,1188,1189,1194,1195,1200,1201,1204,1205,1208],{},[518,1190,1191],{},[413,1192,1193],{},"vercel"," preset has native integration with ",[395,1196,1199],{"href":1197,"rel":1198},"https://vercel.com/docs/cron-jobs",[399],"Vercel Cron Jobs",". Nitro automatically generates the cron job configuration at build time - no manual ",[413,1202,1203],{},"vercel.json"," setup required. You can secure cron endpoints by setting the ",[413,1206,1207],{},"CRON_SECRET"," environment variable.",[648,1210,1211],{},"More presets (with native primitives support) are planned to be supported!",[383,1213,1215],{"id":1214},"waituntil",[413,1216,839],{},[391,1218,1219],{},"When running background tasks, you might want to make sure the server or worker waits until the task is done.",[391,1221,1222,1223,1226,1227,1231],{},"An optional ",[413,1224,1225],{},"context.waitUntil"," function ",[1228,1229,1230],"em",{},"might"," be available depending on the runtime.",[406,1233,1235],{"className":408,"code":1234,"language":411,"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",[413,1236,1237,1247,1257,1278,1288,1296,1306,1310],{"__ignoreMap":5},[416,1238,1239,1241,1243,1245],{"class":418,"line":419},[416,1240,450],{"class":422},[416,1242,453],{"class":422},[416,1244,534],{"class":456},[416,1246,460],{"class":426},[416,1248,1249,1251,1253,1255],{"class":418,"line":440},[416,1250,572],{"class":456},[416,1252,575],{"class":426},[416,1254,585],{"class":578},[416,1256,588],{"class":426},[416,1258,1259,1262,1265,1267,1270,1272,1275],{"class":418,"line":447},[416,1260,1261],{"class":422},"    const",[416,1263,1264],{"class":475}," promise",[416,1266,704],{"class":422},[416,1268,1269],{"class":456}," fetch",[416,1271,599],{"class":426},[416,1273,1274],{"class":422},"...",[416,1276,1277],{"class":426},")\n",[416,1279,1280,1283,1285],{"class":418,"line":463},[416,1281,1282],{"class":426},"    context.",[416,1284,839],{"class":456},[416,1286,1287],{"class":426},"?.(promise);\n",[416,1289,1290,1293],{"class":418,"line":469},[416,1291,1292],{"class":422},"    await",[416,1294,1295],{"class":426}," promise;\n",[416,1297,1298,1300,1302,1304],{"class":418,"line":479},[416,1299,611],{"class":422},[416,1301,614],{"class":426},[416,1303,617],{"class":433},[416,1305,620],{"class":426},[416,1307,1308],{"class":418,"line":485},[416,1309,567],{"class":426},[416,1311,1312],{"class":418,"line":608},[416,1313,631],{"class":426},[383,1315,1317],{"id":1316},"programmatically-run-tasks","Programmatically run tasks",[391,1319,1320,1321,1324,1325,1328],{},"To manually run tasks, you can use ",[413,1322,1323],{},"runTask(name, { payload?, context? })"," utility from ",[413,1326,1327],{},"nitro/task",".",[391,1330,1331],{},[518,1332,520],{},[406,1334,1337],{"className":408,"code":1335,"filename":1336,"language":411,"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",[413,1338,1339,1353,1357,1384,1389,1408,1434,1438,1446],{"__ignoreMap":5},[416,1340,1341,1343,1346,1348,1351],{"class":418,"line":419},[416,1342,423],{"class":422},[416,1344,1345],{"class":426}," { defineHandler } ",[416,1347,430],{"class":422},[416,1349,1350],{"class":433}," \"nitro\"",[416,1352,437],{"class":426},[416,1354,1355],{"class":418,"line":440},[416,1356,444],{"emptyLinePlaceholder":443},[416,1358,1359,1361,1363,1366,1368,1371,1374,1376,1379,1382],{"class":418,"line":447},[416,1360,450],{"class":422},[416,1362,453],{"class":422},[416,1364,1365],{"class":456}," defineHandler",[416,1367,599],{"class":426},[416,1369,1370],{"class":422},"async",[416,1372,1373],{"class":426}," (",[416,1375,748],{"class":578},[416,1377,1378],{"class":426},") ",[416,1380,1381],{"class":422},"=>",[416,1383,854],{"class":426},[416,1385,1386],{"class":418,"line":463},[416,1387,1388],{"class":1051},"  // IMPORTANT: Authenticate user and validate payload!\n",[416,1390,1391,1394,1397,1399,1402,1405],{"class":418,"line":469},[416,1392,1393],{"class":422},"  const",[416,1395,1396],{"class":475}," payload",[416,1398,704],{"class":422},[416,1400,1401],{"class":426}," Object.",[416,1403,1404],{"class":456},"fromEntries",[416,1406,1407],{"class":426},"(event.url.searchParams);\n",[416,1409,1410,1412,1414,1416,1418,1421,1424,1427,1429,1431],{"class":418,"line":479},[416,1411,1393],{"class":422},[416,1413,721],{"class":426},[416,1415,681],{"class":475},[416,1417,769],{"class":426},[416,1419,1420],{"class":422},"=",[416,1422,1423],{"class":422}," await",[416,1425,1426],{"class":456}," runTask",[416,1428,599],{"class":426},[416,1430,549],{"class":433},[416,1432,1433],{"class":426},", { payload });\n",[416,1435,1436],{"class":418,"line":485},[416,1437,444],{"emptyLinePlaceholder":443},[416,1439,1440,1443],{"class":418,"line":608},[416,1441,1442],{"class":422},"  return",[416,1444,1445],{"class":426}," { result };\n",[416,1447,1448],{"class":418,"line":623},[416,1449,631],{"class":426},[633,1451,1453],{"id":1452},"error-handling","Error handling",[391,1455,1456,1459],{},[413,1457,1458],{},"runTask"," throws an HTTP error if:",[645,1461,1462,1468],{},[648,1463,1464,1465,1122],{},"The task does not exist (status ",[413,1466,1467],{},"404",[648,1469,1470,1471,1122],{},"The task has no handler implementation (status ",[413,1472,1473],{},"501",[391,1475,1476,1477,1479],{},"Any errors thrown inside the task's ",[413,1478,670],{}," function will propagate to the caller.",[383,1481,1483],{"id":1482},"run-tasks-with-dev-server","Run tasks with dev server",[391,1485,1486],{},"Nitro's built-in dev server exposes tasks to be easily executed without programmatic usage.",[633,1488,1490],{"id":1489},"using-api-routes","Using API routes",[1492,1493,1495],"h4",{"id":1494},"_nitrotasks",[413,1496,1497],{},"/_nitro/tasks",[391,1499,1500],{},"This endpoint returns a list of available task names and their meta.",[406,1502,1506],{"className":1503,"code":1504,"language":1505,"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",[413,1507,1508,1513,1518,1525,1531,1540,1545,1552,1561,1565,1569,1577,1582,1594,1602,1608,1614,1619,1625],{"__ignoreMap":5},[416,1509,1510],{"class":418,"line":419},[416,1511,1512],{"class":1051},"// [GET] /_nitro/tasks\n",[416,1514,1515],{"class":418,"line":440},[416,1516,1517],{"class":426},"{\n",[416,1519,1520,1523],{"class":418,"line":447},[416,1521,1522],{"class":475},"  \"tasks\"",[416,1524,958],{"class":426},[416,1526,1527,1529],{"class":418,"line":463},[416,1528,955],{"class":475},[416,1530,958],{"class":426},[416,1532,1533,1536,1538],{"class":418,"line":469},[416,1534,1535],{"class":475},"      \"description\"",[416,1537,1079],{"class":426},[416,1539,976],{"class":433},[416,1541,1542],{"class":418,"line":479},[416,1543,1544],{"class":426},"    },\n",[416,1546,1547,1550],{"class":418,"line":485},[416,1548,1549],{"class":475},"     \"cms:update\"",[416,1551,958],{"class":426},[416,1553,1554,1556,1558],{"class":418,"line":608},[416,1555,1535],{"class":475},[416,1557,1079],{"class":426},[416,1559,1560],{"class":433},"\"Update CMS content\"\n",[416,1562,1563],{"class":418,"line":623},[416,1564,982],{"class":426},[416,1566,1567],{"class":418,"line":628},[416,1568,567],{"class":426},[416,1570,1571,1574],{"class":418,"line":979},[416,1572,1573],{"class":475},"  \"scheduledTasks\"",[416,1575,1576],{"class":426},": [\n",[416,1578,1579],{"class":418,"line":985},[416,1580,1581],{"class":426},"    {\n",[416,1583,1584,1587,1589,1592],{"class":418,"line":990},[416,1585,1586],{"class":475},"      \"cron\"",[416,1588,1079],{"class":426},[416,1590,1591],{"class":433},"\"* * * * *\"",[416,1593,552],{"class":426},[416,1595,1597,1600],{"class":418,"line":1596},14,[416,1598,1599],{"class":475},"      \"tasks\"",[416,1601,1576],{"class":426},[416,1603,1605],{"class":418,"line":1604},15,[416,1606,1607],{"class":433},"        \"cms:update\"\n",[416,1609,1611],{"class":418,"line":1610},16,[416,1612,1613],{"class":426},"      ]\n",[416,1615,1617],{"class":418,"line":1616},17,[416,1618,982],{"class":426},[416,1620,1622],{"class":418,"line":1621},18,[416,1623,1624],{"class":426},"  ]\n",[416,1626,1628],{"class":418,"line":1627},19,[416,1629,792],{"class":426},[1492,1631,1633],{"id":1632},"_nitrotasksname",[413,1634,1635],{},"/_nitro/tasks/:name",[391,1637,1638,1639,682],{},"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 ",[413,1640,1641],{},"\"payload\"",[1643,1644,1645,1729,1778],"code-group",{},[406,1646,1649],{"className":408,"code":1647,"filename":1648,"language":411,"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",[413,1650,1651,1661,1665,1674,1683,1687,1701,1714,1721,1725],{"__ignoreMap":5},[416,1652,1653,1655,1657,1659],{"class":418,"line":419},[416,1654,450],{"class":422},[416,1656,453],{"class":422},[416,1658,534],{"class":456},[416,1660,460],{"class":426},[416,1662,1663],{"class":418,"line":440},[416,1664,541],{"class":426},[416,1666,1667,1669,1672],{"class":418,"line":447},[416,1668,546],{"class":426},[416,1670,1671],{"class":433},"\"echo:payload\"",[416,1673,552],{"class":426},[416,1675,1676,1678,1681],{"class":418,"line":463},[416,1677,557],{"class":426},[416,1679,1680],{"class":433},"\"Returns the provided payload\"",[416,1682,552],{"class":426},[416,1684,1685],{"class":418,"line":469},[416,1686,567],{"class":426},[416,1688,1689,1691,1693,1695,1697,1699],{"class":418,"line":479},[416,1690,572],{"class":456},[416,1692,575],{"class":426},[416,1694,579],{"class":578},[416,1696,582],{"class":426},[416,1698,585],{"class":578},[416,1700,588],{"class":426},[416,1702,1703,1705,1707,1709,1712],{"class":418,"line":485},[416,1704,593],{"class":426},[416,1706,596],{"class":456},[416,1708,599],{"class":426},[416,1710,1711],{"class":433},"\"Running echo task...\"",[416,1713,605],{"class":426},[416,1715,1716,1718],{"class":418,"line":608},[416,1717,611],{"class":422},[416,1719,1720],{"class":426}," { result: payload };\n",[416,1722,1723],{"class":418,"line":623},[416,1724,567],{"class":426},[416,1726,1727],{"class":418,"line":628},[416,1728,631],{"class":426},[406,1730,1733],{"className":1503,"code":1731,"filename":1732,"language":1505,"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",[413,1734,1735,1740,1744,1756,1774],{"__ignoreMap":5},[416,1736,1737],{"class":418,"line":419},[416,1738,1739],{"class":1051},"// [GET] /_nitro/tasks/echo:payload?field=value&array=1&array=2\n",[416,1741,1742],{"class":418,"line":440},[416,1743,1517],{"class":426},[416,1745,1746,1749,1751,1754],{"class":418,"line":447},[416,1747,1748],{"class":475},"  \"field\"",[416,1750,1079],{"class":426},[416,1752,1753],{"class":433},"\"value\"",[416,1755,552],{"class":426},[416,1757,1758,1761,1763,1766,1768,1771],{"class":418,"line":463},[416,1759,1760],{"class":475},"  \"array\"",[416,1762,1060],{"class":426},[416,1764,1765],{"class":433},"\"1\"",[416,1767,582],{"class":426},[416,1769,1770],{"class":433},"\"2\"",[416,1772,1773],{"class":426},"]\n",[416,1775,1776],{"class":418,"line":469},[416,1777,792],{"class":426},[406,1779,1782],{"className":1503,"code":1780,"filename":1781,"language":1505,"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",[413,1783,1784,1789,1794,1799,1804,1809,1814,1819,1824,1829,1834,1839,1843,1853,1865,1872,1881,1885],{"__ignoreMap":5},[416,1785,1786],{"class":418,"line":419},[416,1787,1788],{"class":1051},"/**\n",[416,1790,1791],{"class":418,"line":440},[416,1792,1793],{"class":1051}," * [POST] /_nitro/tasks/echo:payload?field=value\n",[416,1795,1796],{"class":418,"line":447},[416,1797,1798],{"class":1051}," * body: {\n",[416,1800,1801],{"class":418,"line":463},[416,1802,1803],{"class":1051}," *   \"payload\": {\n",[416,1805,1806],{"class":418,"line":469},[416,1807,1808],{"class":1051}," *     \"answer\": 42,\n",[416,1810,1811],{"class":418,"line":479},[416,1812,1813],{"class":1051}," *     \"nested\": {\n",[416,1815,1816],{"class":418,"line":485},[416,1817,1818],{"class":1051}," *       \"value\": true\n",[416,1820,1821],{"class":418,"line":608},[416,1822,1823],{"class":1051}," *     }\n",[416,1825,1826],{"class":418,"line":623},[416,1827,1828],{"class":1051}," *   }\n",[416,1830,1831],{"class":418,"line":628},[416,1832,1833],{"class":1051}," * }\n",[416,1835,1836],{"class":418,"line":979},[416,1837,1838],{"class":1051}," */\n",[416,1840,1841],{"class":418,"line":985},[416,1842,1517],{"class":426},[416,1844,1845,1847,1849,1851],{"class":418,"line":990},[416,1846,1748],{"class":475},[416,1848,1079],{"class":426},[416,1850,1753],{"class":433},[416,1852,552],{"class":426},[416,1854,1855,1858,1860,1863],{"class":418,"line":1596},[416,1856,1857],{"class":475},"  \"answer\"",[416,1859,1079],{"class":426},[416,1861,1862],{"class":475},"42",[416,1864,552],{"class":426},[416,1866,1867,1870],{"class":418,"line":1604},[416,1868,1869],{"class":475},"  \"nested\"",[416,1871,958],{"class":426},[416,1873,1874,1877,1879],{"class":418,"line":1610},[416,1875,1876],{"class":475},"    \"value\"",[416,1878,1079],{"class":426},[416,1880,476],{"class":475},[416,1882,1883],{"class":418,"line":1616},[416,1884,482],{"class":426},[416,1886,1887],{"class":418,"line":1621},[416,1888,792],{"class":426},[1890,1891,1892],"note",{},[391,1893,1894],{},"\nThe JSON payload included in the body will overwrite the keys present in the query params.",[633,1896,1898],{"id":1897},"using-cli","Using CLI",[388,1900,1901],{},[391,1902,1903,1904,1907],{},"\nIt is only possible to run these commands while the ",[518,1905,1906],{},"dev server is running",". You should run them in a second terminal.",[1492,1909,1911],{"id":1910},"list-tasks","List tasks",[406,1913,1917],{"className":1914,"code":1915,"language":1916,"meta":5,"style":5},"language-sh shiki shiki-themes github-light github-dark github-dark","nitro task list\n","sh",[413,1918,1919],{"__ignoreMap":5},[416,1920,1921,1924,1927],{"class":418,"line":419},[416,1922,1923],{"class":456},"nitro",[416,1925,1926],{"class":433}," task",[416,1928,1929],{"class":433}," list\n",[1492,1931,1933],{"id":1932},"run-a-task","Run a task",[406,1935,1937],{"className":1914,"code":1936,"language":1916,"meta":5,"style":5},"nitro task run db:migrate --payload \"{}\"\n",[413,1938,1939],{"__ignoreMap":5},[416,1940,1941,1943,1945,1948,1951,1954],{"class":418,"line":419},[416,1942,1923],{"class":456},[416,1944,1926],{"class":433},[416,1946,1947],{"class":433}," run",[416,1949,1950],{"class":433}," db:migrate",[416,1952,1953],{"class":475}," --payload",[416,1955,1956],{"class":433}," \"{}\"\n",[391,1958,639,1959,1962],{},[413,1960,1961],{},"--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.",[383,1964,1966],{"id":1965},"notes","Notes",[633,1968,1970],{"id":1969},"concurrency","Concurrency",[391,1972,1973,1974,1977],{},"Each task can have ",[518,1975,1976],{},"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.",[1890,1979,1980],{},[391,1981,1982],{},"\nNitro tasks can be running multiple times and in parallel.",[1984,1985,1986],"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":440,"depth":440,"links":1988},[1989,1990,1995,1998,1999,2002,2006],{"id":385,"depth":440,"text":386},{"id":491,"depth":440,"text":492,"children":1991},[1992,1993,1994],{"id":635,"depth":447,"text":636},{"id":795,"depth":447,"text":677},{"id":896,"depth":447,"text":897},{"id":1006,"depth":440,"text":1007,"children":1996},[1997],{"id":1125,"depth":447,"text":1126},{"id":1214,"depth":440,"text":839},{"id":1316,"depth":440,"text":1317,"children":2000},[2001],{"id":1452,"depth":447,"text":1453},{"id":1482,"depth":440,"text":1483,"children":2003},[2004,2005],{"id":1489,"depth":447,"text":1490},{"id":1897,"depth":447,"text":1898},{"id":1965,"depth":440,"text":1966,"children":2007},[2008],{"id":1969,"depth":447,"text":1970},"Nitro tasks allow on-off operations in runtime.","md",{"icon":56},{"icon":56},{"title":53,"description":2009},"fcDQYqAY9pVnbTTI7IZmYH_zKMaVdoIh136BgP7RDMY",[2016,2018],{"title":48,"path":49,"stem":50,"description":2017,"icon":51,"children":-1},"Use plugins to extend Nitro's runtime behavior.",{"title":58,"path":59,"stem":60,"description":2019,"icon":61,"children":-1},"Use a server entry to create a global middleware that runs for all routes before they are matched.",1773242047730]