[{"data":1,"prerenderedAt":1084},["ShallowReactive",2],{"navigation":3,"examples-nav":377,"-examples-server-fetch":478,"-examples-server-fetch-surround":1081},[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",[378,383,387,390,393,396,400,403,406,409,412,415,418,422,425,428,431,434,437,441,444,448,451,454,457,460,463,466,469,472,475],{"title":226,"description":379,"meta":380,"path":227},"File-based API routing with HTTP method support and dynamic parameters.",{"automd":381,"category":382,"icon":229},true,"features",{"title":231,"description":384,"meta":385,"path":232},"Automatic imports for utilities and composables.",{"automd":381,"category":386,"icon":234},"config",{"title":236,"description":388,"meta":389,"path":237},"Cache route responses with configurable bypass logic.",{"automd":381,"category":382,"icon":239},{"title":241,"description":391,"meta":392,"path":242},"Customize error responses with a global error handler.",{"automd":381,"category":382,"icon":244},{"title":38,"description":394,"meta":395,"path":246},"Built-in database support with SQL template literals.",{"automd":381,"category":382,"icon":248},{"title":250,"description":397,"meta":398,"path":251},"Integrate Elysia with Nitro using the server entry.",{"automd":381,"category":399,"icon":253},"backend frameworks",{"title":255,"description":401,"meta":402,"path":256},"Integrate Express with Nitro using the server entry.",{"automd":381,"category":399,"icon":258},{"title":260,"description":404,"meta":405,"path":261},"Integrate Fastify with Nitro using the server entry.",{"automd":381,"category":399,"icon":263},{"title":265,"description":407,"meta":408,"path":266},"Minimal Nitro server using the web standard fetch handler.",{"automd":381,"category":382,"icon":268},{"title":270,"description":410,"meta":411,"path":271},"Integrate Hono with Nitro using the server entry.",{"automd":381,"category":399,"icon":273},{"title":275,"description":413,"meta":414,"path":276},"Custom import aliases for cleaner module paths.",{"automd":381,"category":386,"icon":278},{"title":280,"description":416,"meta":417,"path":281},"Request middleware for authentication, logging, and request modification.",{"automd":381,"category":382,"icon":46},{"title":284,"description":419,"meta":420,"path":285},"Server-side JSX rendering in Nitro with mono-jsx.",{"automd":381,"category":421,"icon":287},"server side rendering",{"title":289,"description":423,"meta":424,"path":290},"Server-side JSX rendering in Nitro with nano-jsx.",{"automd":381,"category":421,"icon":287},{"title":48,"description":426,"meta":427,"path":293},"Extend Nitro with custom plugins for hooks and lifecycle events.",{"automd":381,"category":382,"icon":295},{"title":297,"description":429,"meta":430,"path":298},"Build a custom HTML renderer in Nitro with server-side data fetching.",{"automd":381,"category":421,"icon":300},{"title":302,"description":432,"meta":433,"path":303},"Environment-aware configuration with runtime access.",{"automd":381,"category":386,"icon":305},{"title":307,"description":435,"meta":436,"path":308},"Internal server-to-server requests without network overhead.",{"automd":381,"category":382,"icon":310},{"title":312,"description":438,"meta":439,"path":313},"Server-side syntax highlighting in Nitro with Shiki.",{"automd":381,"category":440,"icon":315},"integrations",{"title":317,"description":442,"meta":443,"path":318},"Define routes programmatically using Nitro's virtual module system.",{"automd":381,"category":382,"icon":320},{"title":322,"description":445,"meta":446,"path":323},"Use Nitro as a Vite plugin for programmatic configuration.",{"automd":381,"category":447,"icon":325},"vite",{"title":327,"description":449,"meta":450,"path":328},"React Server Components with Vite and Nitro.",{"automd":381,"category":447,"icon":330},{"title":332,"description":452,"meta":453,"path":333},"Server-side rendering with vanilla HTML, Vite, and Nitro.",{"automd":381,"category":421,"icon":335},{"title":337,"description":455,"meta":456,"path":338},"Server-side rendering with Preact in Nitro using Vite.",{"automd":381,"category":421,"icon":340},{"title":342,"description":458,"meta":459,"path":343},"Server-side rendering with React in Nitro using Vite.",{"automd":381,"category":421,"icon":330},{"title":346,"description":461,"meta":462,"path":347},"Server-side rendering with SolidJS in Nitro using Vite.",{"automd":381,"category":421,"icon":349},{"title":351,"description":464,"meta":465,"path":352},"Client-side routing with TanStack Router in Nitro using Vite.",{"automd":381,"category":421,"icon":354},{"title":356,"description":467,"meta":468,"path":357},"Full-stack React with TanStack Start in Nitro using Vite.",{"automd":381,"category":421,"icon":354},{"title":360,"description":470,"meta":471,"path":361},"Server-side rendering with Vue Router in Nitro using Vite.",{"automd":381,"category":421,"icon":363},{"title":365,"description":473,"meta":474,"path":366},"End-to-end typesafe APIs with tRPC in Nitro using Vite.",{"automd":381,"category":447,"icon":368},{"title":370,"description":476,"meta":477,"path":371},"Real-time bidirectional communication with WebSocket support.",{"automd":381,"category":382,"icon":373},{"id":479,"title":307,"body":480,"description":435,"extension":1076,"meta":1077,"navigation":1078,"path":308,"seo":1079,"stem":309,"__hash__":1080},"content/4.examples/server-fetch.md",{"type":481,"value":482,"toc":1071,"icon":310},"minimark",[483,929,937,942,994,1007,1011,1047,1054,1058,1067],[484,485,488,666,752,776,831,873],"code-tree",{":expand-all":486,"default-value":487},"true","routes/index.ts",[489,490,495],"pre",{"className":491,"code":492,"filename":493,"language":494,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig, serverFetch } from \"nitro\";\n\nexport default defineConfig({\n  serverDir: \"./\",\n  hooks: {\n    \"dev:start\": async () => {\n      const res = await serverFetch(\"/hello\");\n      const text = await res.text();\n      console.log(\"Fetched /hello in nitro module:\", res.status, text);\n    },\n  },\n});\n","nitro.config.ts","ts",[496,497,498,521,527,543,555,561,582,610,631,648,654,660],"code",{"__ignoreMap":5},[499,500,503,507,511,514,518],"span",{"class":501,"line":502},"line",1,[499,504,506],{"class":505},"so5gQ","import",[499,508,510],{"class":509},"slsVL"," { defineConfig, serverFetch } ",[499,512,513],{"class":505},"from",[499,515,517],{"class":516},"sfrk1"," \"nitro\"",[499,519,520],{"class":509},";\n",[499,522,524],{"class":501,"line":523},2,[499,525,526],{"emptyLinePlaceholder":381},"\n",[499,528,530,533,536,540],{"class":501,"line":529},3,[499,531,532],{"class":505},"export",[499,534,535],{"class":505}," default",[499,537,539],{"class":538},"shcOC"," defineConfig",[499,541,542],{"class":509},"({\n",[499,544,546,549,552],{"class":501,"line":545},4,[499,547,548],{"class":509},"  serverDir: ",[499,550,551],{"class":516},"\"./\"",[499,553,554],{"class":509},",\n",[499,556,558],{"class":501,"line":557},5,[499,559,560],{"class":509},"  hooks: {\n",[499,562,564,567,570,573,576,579],{"class":501,"line":563},6,[499,565,566],{"class":516},"    \"dev:start\"",[499,568,569],{"class":509},": ",[499,571,572],{"class":505},"async",[499,574,575],{"class":509}," () ",[499,577,578],{"class":505},"=>",[499,580,581],{"class":509}," {\n",[499,583,585,588,592,595,598,601,604,607],{"class":501,"line":584},7,[499,586,587],{"class":505},"      const",[499,589,591],{"class":590},"suiK_"," res",[499,593,594],{"class":505}," =",[499,596,597],{"class":505}," await",[499,599,600],{"class":538}," serverFetch",[499,602,603],{"class":509},"(",[499,605,606],{"class":516},"\"/hello\"",[499,608,609],{"class":509},");\n",[499,611,613,615,618,620,622,625,628],{"class":501,"line":612},8,[499,614,587],{"class":505},[499,616,617],{"class":590}," text",[499,619,594],{"class":505},[499,621,597],{"class":505},[499,623,624],{"class":509}," res.",[499,626,627],{"class":538},"text",[499,629,630],{"class":509},"();\n",[499,632,634,637,640,642,645],{"class":501,"line":633},9,[499,635,636],{"class":509},"      console.",[499,638,639],{"class":538},"log",[499,641,603],{"class":509},[499,643,644],{"class":516},"\"Fetched /hello in nitro module:\"",[499,646,647],{"class":509},", res.status, text);\n",[499,649,651],{"class":501,"line":650},10,[499,652,653],{"class":509},"    },\n",[499,655,657],{"class":501,"line":656},11,[499,658,659],{"class":509},"  },\n",[499,661,663],{"class":501,"line":662},12,[499,664,665],{"class":509},"});\n",[489,667,672],{"className":668,"code":669,"filename":670,"language":671,"meta":5,"style":5},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"nitro dev\",\n    \"build\": \"nitro build\"\n  },\n  \"devDependencies\": {\n    \"nitro\": \"latest\"\n  }\n}\n","package.json","json",[496,673,674,679,691,699,711,721,725,732,742,747],{"__ignoreMap":5},[499,675,676],{"class":501,"line":502},[499,677,678],{"class":509},"{\n",[499,680,681,684,686,689],{"class":501,"line":523},[499,682,683],{"class":590},"  \"type\"",[499,685,569],{"class":509},[499,687,688],{"class":516},"\"module\"",[499,690,554],{"class":509},[499,692,693,696],{"class":501,"line":529},[499,694,695],{"class":590},"  \"scripts\"",[499,697,698],{"class":509},": {\n",[499,700,701,704,706,709],{"class":501,"line":545},[499,702,703],{"class":590},"    \"dev\"",[499,705,569],{"class":509},[499,707,708],{"class":516},"\"nitro dev\"",[499,710,554],{"class":509},[499,712,713,716,718],{"class":501,"line":557},[499,714,715],{"class":590},"    \"build\"",[499,717,569],{"class":509},[499,719,720],{"class":516},"\"nitro build\"\n",[499,722,723],{"class":501,"line":563},[499,724,659],{"class":509},[499,726,727,730],{"class":501,"line":584},[499,728,729],{"class":590},"  \"devDependencies\"",[499,731,698],{"class":509},[499,733,734,737,739],{"class":501,"line":612},[499,735,736],{"class":590},"    \"nitro\"",[499,738,569],{"class":509},[499,740,741],{"class":516},"\"latest\"\n",[499,743,744],{"class":501,"line":633},[499,745,746],{"class":509},"  }\n",[499,748,749],{"class":501,"line":650},[499,750,751],{"class":509},"}\n",[489,753,756],{"className":668,"code":754,"filename":755,"language":671,"meta":5,"style":5},"{\n  \"extends\": \"nitro/tsconfig\"\n}\n","tsconfig.json",[496,757,758,762,772],{"__ignoreMap":5},[499,759,760],{"class":501,"line":502},[499,761,678],{"class":509},[499,763,764,767,769],{"class":501,"line":523},[499,765,766],{"class":590},"  \"extends\"",[499,768,569],{"class":509},[499,770,771],{"class":516},"\"nitro/tsconfig\"\n",[499,773,774],{"class":501,"line":529},[499,775,751],{"class":509},[489,777,780],{"className":491,"code":778,"filename":779,"language":494,"meta":5,"style":5},"import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({ plugins: [nitro()] });\n","vite.config.ts",[496,781,782,796,810,814],{"__ignoreMap":5},[499,783,784,786,789,791,794],{"class":501,"line":502},[499,785,506],{"class":505},[499,787,788],{"class":509}," { defineConfig } ",[499,790,513],{"class":505},[499,792,793],{"class":516}," \"vite\"",[499,795,520],{"class":509},[499,797,798,800,803,805,808],{"class":501,"line":523},[499,799,506],{"class":505},[499,801,802],{"class":509}," { nitro } ",[499,804,513],{"class":505},[499,806,807],{"class":516}," \"nitro/vite\"",[499,809,520],{"class":509},[499,811,812],{"class":501,"line":529},[499,813,526],{"emptyLinePlaceholder":381},[499,815,816,818,820,822,825,828],{"class":501,"line":545},[499,817,532],{"class":505},[499,819,535],{"class":505},[499,821,539],{"class":538},[499,823,824],{"class":509},"({ plugins: [",[499,826,827],{"class":538},"nitro",[499,829,830],{"class":509},"()] });\n",[489,832,835],{"className":491,"code":833,"filename":834,"language":494,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(() => \"Hello!\");\n","routes/hello.ts",[496,836,837,850,854],{"__ignoreMap":5},[499,838,839,841,844,846,848],{"class":501,"line":502},[499,840,506],{"class":505},[499,842,843],{"class":509}," { defineHandler } ",[499,845,513],{"class":505},[499,847,517],{"class":516},[499,849,520],{"class":509},[499,851,852],{"class":501,"line":523},[499,853,526],{"emptyLinePlaceholder":381},[499,855,856,858,860,863,866,868,871],{"class":501,"line":529},[499,857,532],{"class":505},[499,859,535],{"class":505},[499,861,862],{"class":538}," defineHandler",[499,864,865],{"class":509},"(() ",[499,867,578],{"class":505},[499,869,870],{"class":516}," \"Hello!\"",[499,872,609],{"class":509},[489,874,876],{"className":491,"code":875,"filename":487,"language":494,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\nimport { fetch } from \"nitro\";\n\nexport default defineHandler(() => fetch(\"/hello\"));\n",[496,877,878,890,903,907],{"__ignoreMap":5},[499,879,880,882,884,886,888],{"class":501,"line":502},[499,881,506],{"class":505},[499,883,843],{"class":509},[499,885,513],{"class":505},[499,887,517],{"class":516},[499,889,520],{"class":509},[499,891,892,894,897,899,901],{"class":501,"line":523},[499,893,506],{"class":505},[499,895,896],{"class":509}," { fetch } ",[499,898,513],{"class":505},[499,900,517],{"class":516},[499,902,520],{"class":509},[499,904,905],{"class":501,"line":529},[499,906,526],{"emptyLinePlaceholder":381},[499,908,909,911,913,915,917,919,922,924,926],{"class":501,"line":545},[499,910,532],{"class":505},[499,912,535],{"class":505},[499,914,862],{"class":538},[499,916,865],{"class":509},[499,918,578],{"class":505},[499,920,921],{"class":538}," fetch",[499,923,603],{"class":509},[499,925,606],{"class":516},[499,927,928],{"class":509},"));\n",[930,931,932,933,936],"p",{},"When you need one route to call another, use Nitro's ",[496,934,935],{},"fetch"," function instead of the global fetch. It makes internal requests that stay in-process, avoiding network round-trips. The request never leaves the server.",[938,939,941],"h2",{"id":940},"main-route","Main Route",[489,943,944],{"className":491,"code":875,"filename":487,"language":494,"meta":5,"style":5},[496,945,946,958,970,974],{"__ignoreMap":5},[499,947,948,950,952,954,956],{"class":501,"line":502},[499,949,506],{"class":505},[499,951,843],{"class":509},[499,953,513],{"class":505},[499,955,517],{"class":516},[499,957,520],{"class":509},[499,959,960,962,964,966,968],{"class":501,"line":523},[499,961,506],{"class":505},[499,963,896],{"class":509},[499,965,513],{"class":505},[499,967,517],{"class":516},[499,969,520],{"class":509},[499,971,972],{"class":501,"line":529},[499,973,526],{"emptyLinePlaceholder":381},[499,975,976,978,980,982,984,986,988,990,992],{"class":501,"line":545},[499,977,532],{"class":505},[499,979,535],{"class":505},[499,981,862],{"class":538},[499,983,865],{"class":509},[499,985,578],{"class":505},[499,987,921],{"class":538},[499,989,603],{"class":509},[499,991,606],{"class":516},[499,993,928],{"class":509},[930,995,996,997,999,1000,1002,1003,1006],{},"The index route imports ",[496,998,935],{}," from ",[496,1001,827],{}," (not the global fetch) and calls the ",[496,1004,1005],{},"/hello"," route. This request is handled internally without going through the network stack.",[938,1008,1010],{"id":1009},"internal-api-route","Internal API Route",[489,1012,1013],{"className":491,"code":833,"filename":834,"language":494,"meta":5,"style":5},[496,1014,1015,1027,1031],{"__ignoreMap":5},[499,1016,1017,1019,1021,1023,1025],{"class":501,"line":502},[499,1018,506],{"class":505},[499,1020,843],{"class":509},[499,1022,513],{"class":505},[499,1024,517],{"class":516},[499,1026,520],{"class":509},[499,1028,1029],{"class":501,"line":523},[499,1030,526],{"emptyLinePlaceholder":381},[499,1032,1033,1035,1037,1039,1041,1043,1045],{"class":501,"line":529},[499,1034,532],{"class":505},[499,1036,535],{"class":505},[499,1038,862],{"class":538},[499,1040,865],{"class":509},[499,1042,578],{"class":505},[499,1044,870],{"class":516},[499,1046,609],{"class":509},[930,1048,1049,1050,1053],{},"A simple route that returns \"Hello!\". When the index route calls ",[496,1051,1052],{},"fetch(\"/hello\")",", this handler runs and its response is returned directly.",[938,1055,1057],{"id":1056},"learn-more","Learn More",[1059,1060,1061],"ul",{},[1062,1063,1064],"li",{},[1065,1066,23],"a",{"href":24},[1068,1069,1070],"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);}",{"title":5,"searchDepth":523,"depth":523,"links":1072},[1073,1074,1075],{"id":940,"depth":523,"text":941},{"id":1009,"depth":523,"text":1010},{"id":1056,"depth":523,"text":1057},"md",{"automd":381,"category":382,"icon":310},{"icon":310},{"title":307,"description":435},"ahnDss6R_vLX8iMaxcV_OU1CtI2h6jYlnLs3apfMlVU",[1082,1083],{"title":302,"path":303,"stem":304,"description":432,"icon":305,"children":-1},{"title":312,"path":313,"stem":314,"description":438,"icon":315,"children":-1},1773242040614]