[{"data":1,"prerenderedAt":1109},["ShallowReactive",2],{"navigation":3,"examples-nav":402,"-examples-server-fetch":503,"-examples-server-fetch-surround":1106},[4,93,226,232,387,399],{"title":5,"path":6,"stem":7,"children":8,"icon":92},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82,87],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","/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},"OpenAPI","/docs/openapi","1.docs/50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"WebSocket","/docs/websocket","1.docs/50.websocket","ri:broadcast-fill",{"title":68,"path":69,"stem":70,"icon":71},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":73,"path":74,"stem":75,"icon":76},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":78,"path":79,"stem":80,"icon":81},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":83,"path":84,"stem":85,"icon":86},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":88,"path":89,"stem":90,"icon":91},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":94,"path":95,"stem":96,"children":97,"icon":99},"Deploy","/deploy","2.deploy/0.index",[98,100,121],{"title":94,"path":95,"stem":96,"icon":99},"ri:upload-cloud-2-line",{"title":101,"path":102,"stem":103,"children":104,"page":120},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[105,110,115],{"title":106,"path":107,"stem":108,"icon":109},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":111,"path":112,"stem":113,"icon":114},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":116,"path":117,"stem":118,"icon":119},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":122,"path":123,"stem":124,"children":125,"page":120},"Providers","/deploy/providers","2.deploy/20.providers",[126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,222],{"title":127,"path":128,"stem":129},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":131,"path":132,"stem":133},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":135,"path":136,"stem":137},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":139,"path":140,"stem":141},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":143,"path":144,"stem":145},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":147,"path":148,"stem":149},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":151,"path":152,"stem":153},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":155,"path":156,"stem":157},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":159,"path":160,"stem":161},"EdgeOne Pages","/deploy/providers/edgeone","2.deploy/20.providers/edgeone",{"title":163,"path":164,"stem":165},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":167,"path":168,"stem":169},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":171,"path":172,"stem":173},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":175,"path":176,"stem":177},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":179,"path":180,"stem":181},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":183,"path":184,"stem":185},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":187,"path":188,"stem":189},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":191,"path":192,"stem":193},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":195,"path":196,"stem":197},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":199,"path":200,"stem":201},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":203,"path":204,"stem":205},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":207,"path":208,"stem":209},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":211,"path":212,"stem":213},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":215,"path":216,"stem":217},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":219,"path":220,"stem":221},"Zephyr Cloud","/deploy/providers/zephyr","2.deploy/20.providers/zephyr",{"title":223,"path":224,"stem":225},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":227,"path":228,"stem":229,"children":230,"icon":36},"Config","/config","3.config/0.index",[231],{"title":227,"path":228,"stem":229,"icon":36},{"title":233,"path":234,"stem":235,"children":236,"icon":238},"Examples","/examples","4.examples/0.index",[237,239,244,249,254,259,263,268,273,278,283,288,293,297,302,306,310,315,320,325,330,335,340,345,350,355,359,364,369,373,378,383],{"title":233,"path":234,"stem":235,"icon":238},"i-lucide-folder-code",{"title":240,"path":241,"stem":242,"icon":243},"API Routes","/examples/api-routes","4.examples/api-routes","i-lucide-route",{"title":245,"path":246,"stem":247,"icon":248},"Auto Imports","/examples/auto-imports","4.examples/auto-imports","i-lucide-import",{"title":250,"path":251,"stem":252,"icon":253},"Cached Handler","/examples/cached-handler","4.examples/cached-handler","i-lucide-clock",{"title":255,"path":256,"stem":257,"icon":258},"Custom Error Handler","/examples/custom-error-handler","4.examples/custom-error-handler","i-lucide-alert-circle",{"title":38,"path":260,"stem":261,"icon":262},"/examples/database","4.examples/database","i-lucide-database",{"title":264,"path":265,"stem":266,"icon":267},"Elysia","/examples/elysia","4.examples/elysia","i-skill-icons-elysia-dark",{"title":269,"path":270,"stem":271,"icon":272},"Express","/examples/express","4.examples/express","i-simple-icons-express",{"title":274,"path":275,"stem":276,"icon":277},"Fastify","/examples/fastify","4.examples/fastify","i-simple-icons-fastify",{"title":279,"path":280,"stem":281,"icon":282},"Hello World","/examples/hello-world","4.examples/hello-world","i-lucide-sparkles",{"title":284,"path":285,"stem":286,"icon":287},"Hono","/examples/hono","4.examples/hono","i-logos-hono",{"title":289,"path":290,"stem":291,"icon":292},"Import Alias","/examples/import-alias","4.examples/import-alias","i-lucide-at-sign",{"title":294,"path":295,"stem":296,"icon":46},"Middleware","/examples/middleware","4.examples/middleware",{"title":298,"path":299,"stem":300,"icon":301},"Mono JSX","/examples/mono-jsx","4.examples/mono-jsx","i-lucide-brackets",{"title":303,"path":304,"stem":305,"icon":301},"Nano JSX","/examples/nano-jsx","4.examples/nano-jsx",{"title":53,"path":307,"stem":308,"icon":309},"/examples/plugins","4.examples/plugins","i-lucide-plug",{"title":311,"path":312,"stem":313,"icon":314},"Custom Renderer","/examples/renderer","4.examples/renderer","i-lucide-code",{"title":316,"path":317,"stem":318,"icon":319},"Runtime Config","/examples/runtime-config","4.examples/runtime-config","i-lucide-settings",{"title":321,"path":322,"stem":323,"icon":324},"Server Fetch","/examples/server-fetch","4.examples/server-fetch","i-lucide-arrow-right-left",{"title":326,"path":327,"stem":328,"icon":329},"Shiki","/examples/shiki","4.examples/shiki","i-lucide-highlighter",{"title":331,"path":332,"stem":333,"icon":334},"Virtual Routes","/examples/virtual-routes","4.examples/virtual-routes","i-lucide-box",{"title":336,"path":337,"stem":338,"icon":339},"Vite Nitro Plugin","/examples/vite-nitro-plugin","4.examples/vite-nitro-plugin","i-logos-vitejs",{"title":341,"path":342,"stem":343,"icon":344},"Vite RSC","/examples/vite-rsc","4.examples/vite-rsc","i-logos-react",{"title":346,"path":347,"stem":348,"icon":349},"Vite SSR HTML","/examples/vite-ssr-html","4.examples/vite-ssr-html","i-logos-html-5",{"title":351,"path":352,"stem":353,"icon":354},"SSR with Preact","/examples/vite-ssr-preact","4.examples/vite-ssr-preact","i-logos-preact",{"title":356,"path":357,"stem":358,"icon":344},"SSR with React","/examples/vite-ssr-react","4.examples/vite-ssr-react",{"title":360,"path":361,"stem":362,"icon":363},"SSR with SolidJS","/examples/vite-ssr-solid","4.examples/vite-ssr-solid","i-logos-solidjs-icon",{"title":365,"path":366,"stem":367,"icon":368},"SSR with TanStack Router","/examples/vite-ssr-tsr-react","4.examples/vite-ssr-tsr-react","i-simple-icons-tanstack",{"title":370,"path":371,"stem":372,"icon":368},"SSR with TanStack Start","/examples/vite-ssr-tss-react","4.examples/vite-ssr-tss-react",{"title":374,"path":375,"stem":376,"icon":377},"SSR with Vue Router","/examples/vite-ssr-vue-router","4.examples/vite-ssr-vue-router","i-logos-vue",{"title":379,"path":380,"stem":381,"icon":382},"Vite + tRPC","/examples/vite-trpc","4.examples/vite-trpc","i-simple-icons-trpc",{"title":63,"path":384,"stem":385,"icon":386},"/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":388,"path":389,"stem":390,"children":391},"Blog","/blog","9.blog",[392,395],{"title":388,"path":389,"stem":393,"icon":394},"9.blog/index","i-lucide-file-text",{"title":396,"path":397,"stem":398,"icon":394},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":400,"stem":401},"/","index",[403,408,412,415,418,421,425,428,431,434,437,440,443,447,450,453,456,459,462,466,469,473,476,479,482,485,488,491,494,497,500],{"title":240,"description":404,"meta":405,"path":241},"File-based API routing with HTTP method support and dynamic parameters.",{"automd":406,"category":407,"icon":243},true,"features",{"title":245,"description":409,"meta":410,"path":246},"Automatic imports for utilities and composables.",{"automd":406,"category":411,"icon":248},"config",{"title":250,"description":413,"meta":414,"path":251},"Cache route responses with configurable bypass logic.",{"automd":406,"category":407,"icon":253},{"title":255,"description":416,"meta":417,"path":256},"Customize error responses with a global error handler.",{"automd":406,"category":407,"icon":258},{"title":38,"description":419,"meta":420,"path":260},"Built-in database support with SQL template literals.",{"automd":406,"category":407,"icon":262},{"title":264,"description":422,"meta":423,"path":265},"Integrate Elysia with Nitro using the server entry.",{"automd":406,"category":424,"icon":267},"backend frameworks",{"title":269,"description":426,"meta":427,"path":270},"Integrate Express with Nitro using the server entry.",{"automd":406,"category":424,"icon":272},{"title":274,"description":429,"meta":430,"path":275},"Integrate Fastify with Nitro using the server entry.",{"automd":406,"category":424,"icon":277},{"title":279,"description":432,"meta":433,"path":280},"Minimal Nitro server using the web standard fetch handler.",{"automd":406,"category":407,"icon":282},{"title":284,"description":435,"meta":436,"path":285},"Integrate Hono with Nitro using the server entry.",{"automd":406,"category":424,"icon":287},{"title":289,"description":438,"meta":439,"path":290},"Custom import aliases for cleaner module paths.",{"automd":406,"category":411,"icon":292},{"title":294,"description":441,"meta":442,"path":295},"Request middleware for authentication, logging, and request modification.",{"automd":406,"category":407,"icon":46},{"title":298,"description":444,"meta":445,"path":299},"Server-side JSX rendering in Nitro with mono-jsx.",{"automd":406,"category":446,"icon":301},"server side rendering",{"title":303,"description":448,"meta":449,"path":304},"Server-side JSX rendering in Nitro with nano-jsx.",{"automd":406,"category":446,"icon":301},{"title":53,"description":451,"meta":452,"path":307},"Extend Nitro with custom plugins for hooks and lifecycle events.",{"automd":406,"category":407,"icon":309},{"title":311,"description":454,"meta":455,"path":312},"Build a custom HTML renderer in Nitro with server-side data fetching.",{"automd":406,"category":446,"icon":314},{"title":316,"description":457,"meta":458,"path":317},"Environment-aware configuration with runtime access.",{"automd":406,"category":411,"icon":319},{"title":321,"description":460,"meta":461,"path":322},"Internal server-to-server requests without network overhead.",{"automd":406,"category":407,"icon":324},{"title":326,"description":463,"meta":464,"path":327},"Server-side syntax highlighting in Nitro with Shiki.",{"automd":406,"category":465,"icon":329},"integrations",{"title":331,"description":467,"meta":468,"path":332},"Define routes programmatically using Nitro's virtual module system.",{"automd":406,"category":407,"icon":334},{"title":336,"description":470,"meta":471,"path":337},"Use Nitro as a Vite plugin for programmatic configuration.",{"automd":406,"category":472,"icon":339},"vite",{"title":341,"description":474,"meta":475,"path":342},"React Server Components with Vite and Nitro.",{"automd":406,"category":472,"icon":344},{"title":346,"description":477,"meta":478,"path":347},"Server-side rendering with vanilla HTML, Vite, and Nitro.",{"automd":406,"category":446,"icon":349},{"title":351,"description":480,"meta":481,"path":352},"Server-side rendering with Preact in Nitro using Vite.",{"automd":406,"category":446,"icon":354},{"title":356,"description":483,"meta":484,"path":357},"Server-side rendering with React in Nitro using Vite.",{"automd":406,"category":446,"icon":344},{"title":360,"description":486,"meta":487,"path":361},"Server-side rendering with SolidJS in Nitro using Vite.",{"automd":406,"category":446,"icon":363},{"title":365,"description":489,"meta":490,"path":366},"Client-side routing with TanStack Router in Nitro using Vite.",{"automd":406,"category":446,"icon":368},{"title":370,"description":492,"meta":493,"path":371},"Full-stack React with TanStack Start in Nitro using Vite.",{"automd":406,"category":446,"icon":368},{"title":374,"description":495,"meta":496,"path":375},"Server-side rendering with Vue Router in Nitro using Vite.",{"automd":406,"category":446,"icon":377},{"title":379,"description":498,"meta":499,"path":380},"End-to-end typesafe APIs with tRPC in Nitro using Vite.",{"automd":406,"category":472,"icon":382},{"title":63,"description":501,"meta":502,"path":384},"Real-time bidirectional communication with WebSocket support.",{"automd":406,"category":407,"icon":386},{"id":504,"title":321,"body":505,"description":460,"extension":1101,"meta":1102,"navigation":1103,"path":322,"seo":1104,"stem":323,"__hash__":1105},"content/4.examples/server-fetch.md",{"type":506,"value":507,"toc":1096,"icon":324},"minimark",[508,954,962,967,1019,1032,1036,1072,1079,1083,1092],[509,510,513,691,777,801,856,898],"code-tree",{":expand-all":511,"default-value":512},"true","routes/index.ts",[514,515,520],"pre",{"className":516,"code":517,"filename":518,"language":519,"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",[521,522,523,546,552,568,580,586,607,635,656,673,679,685],"code",{"__ignoreMap":5},[524,525,528,532,536,539,543],"span",{"class":526,"line":527},"line",1,[524,529,531],{"class":530},"so5gQ","import",[524,533,535],{"class":534},"slsVL"," { defineConfig, serverFetch } ",[524,537,538],{"class":530},"from",[524,540,542],{"class":541},"sfrk1"," \"nitro\"",[524,544,545],{"class":534},";\n",[524,547,549],{"class":526,"line":548},2,[524,550,551],{"emptyLinePlaceholder":406},"\n",[524,553,555,558,561,565],{"class":526,"line":554},3,[524,556,557],{"class":530},"export",[524,559,560],{"class":530}," default",[524,562,564],{"class":563},"shcOC"," defineConfig",[524,566,567],{"class":534},"({\n",[524,569,571,574,577],{"class":526,"line":570},4,[524,572,573],{"class":534},"  serverDir: ",[524,575,576],{"class":541},"\"./\"",[524,578,579],{"class":534},",\n",[524,581,583],{"class":526,"line":582},5,[524,584,585],{"class":534},"  hooks: {\n",[524,587,589,592,595,598,601,604],{"class":526,"line":588},6,[524,590,591],{"class":541},"    \"dev:start\"",[524,593,594],{"class":534},": ",[524,596,597],{"class":530},"async",[524,599,600],{"class":534}," () ",[524,602,603],{"class":530},"=>",[524,605,606],{"class":534}," {\n",[524,608,610,613,617,620,623,626,629,632],{"class":526,"line":609},7,[524,611,612],{"class":530},"      const",[524,614,616],{"class":615},"suiK_"," res",[524,618,619],{"class":530}," =",[524,621,622],{"class":530}," await",[524,624,625],{"class":563}," serverFetch",[524,627,628],{"class":534},"(",[524,630,631],{"class":541},"\"/hello\"",[524,633,634],{"class":534},");\n",[524,636,638,640,643,645,647,650,653],{"class":526,"line":637},8,[524,639,612],{"class":530},[524,641,642],{"class":615}," text",[524,644,619],{"class":530},[524,646,622],{"class":530},[524,648,649],{"class":534}," res.",[524,651,652],{"class":563},"text",[524,654,655],{"class":534},"();\n",[524,657,659,662,665,667,670],{"class":526,"line":658},9,[524,660,661],{"class":534},"      console.",[524,663,664],{"class":563},"log",[524,666,628],{"class":534},[524,668,669],{"class":541},"\"Fetched /hello in nitro module:\"",[524,671,672],{"class":534},", res.status, text);\n",[524,674,676],{"class":526,"line":675},10,[524,677,678],{"class":534},"    },\n",[524,680,682],{"class":526,"line":681},11,[524,683,684],{"class":534},"  },\n",[524,686,688],{"class":526,"line":687},12,[524,689,690],{"class":534},"});\n",[514,692,697],{"className":693,"code":694,"filename":695,"language":696,"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",[521,698,699,704,716,724,736,746,750,757,767,772],{"__ignoreMap":5},[524,700,701],{"class":526,"line":527},[524,702,703],{"class":534},"{\n",[524,705,706,709,711,714],{"class":526,"line":548},[524,707,708],{"class":615},"  \"type\"",[524,710,594],{"class":534},[524,712,713],{"class":541},"\"module\"",[524,715,579],{"class":534},[524,717,718,721],{"class":526,"line":554},[524,719,720],{"class":615},"  \"scripts\"",[524,722,723],{"class":534},": {\n",[524,725,726,729,731,734],{"class":526,"line":570},[524,727,728],{"class":615},"    \"dev\"",[524,730,594],{"class":534},[524,732,733],{"class":541},"\"nitro dev\"",[524,735,579],{"class":534},[524,737,738,741,743],{"class":526,"line":582},[524,739,740],{"class":615},"    \"build\"",[524,742,594],{"class":534},[524,744,745],{"class":541},"\"nitro build\"\n",[524,747,748],{"class":526,"line":588},[524,749,684],{"class":534},[524,751,752,755],{"class":526,"line":609},[524,753,754],{"class":615},"  \"devDependencies\"",[524,756,723],{"class":534},[524,758,759,762,764],{"class":526,"line":637},[524,760,761],{"class":615},"    \"nitro\"",[524,763,594],{"class":534},[524,765,766],{"class":541},"\"latest\"\n",[524,768,769],{"class":526,"line":658},[524,770,771],{"class":534},"  }\n",[524,773,774],{"class":526,"line":675},[524,775,776],{"class":534},"}\n",[514,778,781],{"className":693,"code":779,"filename":780,"language":696,"meta":5,"style":5},"{\n  \"extends\": \"nitro/tsconfig\"\n}\n","tsconfig.json",[521,782,783,787,797],{"__ignoreMap":5},[524,784,785],{"class":526,"line":527},[524,786,703],{"class":534},[524,788,789,792,794],{"class":526,"line":548},[524,790,791],{"class":615},"  \"extends\"",[524,793,594],{"class":534},[524,795,796],{"class":541},"\"nitro/tsconfig\"\n",[524,798,799],{"class":526,"line":554},[524,800,776],{"class":534},[514,802,805],{"className":516,"code":803,"filename":804,"language":519,"meta":5,"style":5},"import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({ plugins: [nitro()] });\n","vite.config.ts",[521,806,807,821,835,839],{"__ignoreMap":5},[524,808,809,811,814,816,819],{"class":526,"line":527},[524,810,531],{"class":530},[524,812,813],{"class":534}," { defineConfig } ",[524,815,538],{"class":530},[524,817,818],{"class":541}," \"vite\"",[524,820,545],{"class":534},[524,822,823,825,828,830,833],{"class":526,"line":548},[524,824,531],{"class":530},[524,826,827],{"class":534}," { nitro } ",[524,829,538],{"class":530},[524,831,832],{"class":541}," \"nitro/vite\"",[524,834,545],{"class":534},[524,836,837],{"class":526,"line":554},[524,838,551],{"emptyLinePlaceholder":406},[524,840,841,843,845,847,850,853],{"class":526,"line":570},[524,842,557],{"class":530},[524,844,560],{"class":530},[524,846,564],{"class":563},[524,848,849],{"class":534},"({ plugins: [",[524,851,852],{"class":563},"nitro",[524,854,855],{"class":534},"()] });\n",[514,857,860],{"className":516,"code":858,"filename":859,"language":519,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\n\nexport default defineHandler(() => \"Hello!\");\n","routes/hello.ts",[521,861,862,875,879],{"__ignoreMap":5},[524,863,864,866,869,871,873],{"class":526,"line":527},[524,865,531],{"class":530},[524,867,868],{"class":534}," { defineHandler } ",[524,870,538],{"class":530},[524,872,542],{"class":541},[524,874,545],{"class":534},[524,876,877],{"class":526,"line":548},[524,878,551],{"emptyLinePlaceholder":406},[524,880,881,883,885,888,891,893,896],{"class":526,"line":554},[524,882,557],{"class":530},[524,884,560],{"class":530},[524,886,887],{"class":563}," defineHandler",[524,889,890],{"class":534},"(() ",[524,892,603],{"class":530},[524,894,895],{"class":541}," \"Hello!\"",[524,897,634],{"class":534},[514,899,901],{"className":516,"code":900,"filename":512,"language":519,"meta":5,"style":5},"import { defineHandler } from \"nitro\";\nimport { fetch } from \"nitro\";\n\nexport default defineHandler(() => fetch(\"/hello\"));\n",[521,902,903,915,928,932],{"__ignoreMap":5},[524,904,905,907,909,911,913],{"class":526,"line":527},[524,906,531],{"class":530},[524,908,868],{"class":534},[524,910,538],{"class":530},[524,912,542],{"class":541},[524,914,545],{"class":534},[524,916,917,919,922,924,926],{"class":526,"line":548},[524,918,531],{"class":530},[524,920,921],{"class":534}," { fetch } ",[524,923,538],{"class":530},[524,925,542],{"class":541},[524,927,545],{"class":534},[524,929,930],{"class":526,"line":554},[524,931,551],{"emptyLinePlaceholder":406},[524,933,934,936,938,940,942,944,947,949,951],{"class":526,"line":570},[524,935,557],{"class":530},[524,937,560],{"class":530},[524,939,887],{"class":563},[524,941,890],{"class":534},[524,943,603],{"class":530},[524,945,946],{"class":563}," fetch",[524,948,628],{"class":534},[524,950,631],{"class":541},[524,952,953],{"class":534},"));\n",[955,956,957,958,961],"p",{},"When you need one route to call another, use Nitro's ",[521,959,960],{},"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.",[963,964,966],"h2",{"id":965},"main-route","Main Route",[514,968,969],{"className":516,"code":900,"filename":512,"language":519,"meta":5,"style":5},[521,970,971,983,995,999],{"__ignoreMap":5},[524,972,973,975,977,979,981],{"class":526,"line":527},[524,974,531],{"class":530},[524,976,868],{"class":534},[524,978,538],{"class":530},[524,980,542],{"class":541},[524,982,545],{"class":534},[524,984,985,987,989,991,993],{"class":526,"line":548},[524,986,531],{"class":530},[524,988,921],{"class":534},[524,990,538],{"class":530},[524,992,542],{"class":541},[524,994,545],{"class":534},[524,996,997],{"class":526,"line":554},[524,998,551],{"emptyLinePlaceholder":406},[524,1000,1001,1003,1005,1007,1009,1011,1013,1015,1017],{"class":526,"line":570},[524,1002,557],{"class":530},[524,1004,560],{"class":530},[524,1006,887],{"class":563},[524,1008,890],{"class":534},[524,1010,603],{"class":530},[524,1012,946],{"class":563},[524,1014,628],{"class":534},[524,1016,631],{"class":541},[524,1018,953],{"class":534},[955,1020,1021,1022,1024,1025,1027,1028,1031],{},"The index route imports ",[521,1023,960],{}," from ",[521,1026,852],{}," (not the global fetch) and calls the ",[521,1029,1030],{},"/hello"," route. This request is handled internally without going through the network stack.",[963,1033,1035],{"id":1034},"internal-api-route","Internal API Route",[514,1037,1038],{"className":516,"code":858,"filename":859,"language":519,"meta":5,"style":5},[521,1039,1040,1052,1056],{"__ignoreMap":5},[524,1041,1042,1044,1046,1048,1050],{"class":526,"line":527},[524,1043,531],{"class":530},[524,1045,868],{"class":534},[524,1047,538],{"class":530},[524,1049,542],{"class":541},[524,1051,545],{"class":534},[524,1053,1054],{"class":526,"line":548},[524,1055,551],{"emptyLinePlaceholder":406},[524,1057,1058,1060,1062,1064,1066,1068,1070],{"class":526,"line":554},[524,1059,557],{"class":530},[524,1061,560],{"class":530},[524,1063,887],{"class":563},[524,1065,890],{"class":534},[524,1067,603],{"class":530},[524,1069,895],{"class":541},[524,1071,634],{"class":534},[955,1073,1074,1075,1078],{},"A simple route that returns \"Hello!\". When the index route calls ",[521,1076,1077],{},"fetch(\"/hello\")",", this handler runs and its response is returned directly.",[963,1080,1082],{"id":1081},"learn-more","Learn More",[1084,1085,1086],"ul",{},[1087,1088,1089],"li",{},[1090,1091,23],"a",{"href":24},[1093,1094,1095],"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":548,"depth":548,"links":1097},[1098,1099,1100],{"id":965,"depth":548,"text":966},{"id":1034,"depth":548,"text":1035},{"id":1081,"depth":548,"text":1082},"md",{"automd":406,"category":407,"icon":324},{"icon":324},{"title":321,"description":460},"ahnDss6R_vLX8iMaxcV_OU1CtI2h6jYlnLs3apfMlVU",[1107,1108],{"title":316,"path":317,"stem":318,"description":457,"icon":319,"children":-1},{"title":326,"path":327,"stem":328,"description":463,"icon":329,"children":-1},1776344701701]