[{"data":1,"prerenderedAt":804},["ShallowReactive",2],{"navigation":3,"examples-nav":224,"-examples-virtual-routes":353,"-examples-virtual-routes-surround":797},[4,83,208,214,221],{"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],{"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},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":209,"path":210,"stem":211,"children":212,"icon":36},"Config","/config","3.config/0.index",[213],{"title":209,"path":210,"stem":211,"icon":36},{"title":215,"path":216,"stem":217,"children":218,"icon":220},"Examples","/examples","4.examples/0.index",[219],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-folder-code",{"title":5,"path":222,"stem":223},"/","index",[225,230,235,239,243,246,251,255,259,263,267,271,275,280,284,287,291,295,299,304,308,313,317,321,325,329,333,337,341,345,349],{"title":226,"description":227,"category":228,"path":229},"API Routes","File-based API routing with HTTP method support and dynamic parameters.","features","/examples/api-routes/readme",{"title":231,"description":232,"category":233,"path":234},"Auto Imports","Automatic imports for utilities and composables.","config","/examples/auto-imports/readme",{"title":236,"description":237,"category":228,"path":238},"Cached Handler","Cache route responses with configurable bypass logic.","/examples/cached-handler/readme",{"title":240,"description":241,"category":228,"path":242},"Custom Error Handler","Customize error responses with a global error handler.","/examples/custom-error-handler/readme",{"title":38,"description":244,"category":228,"path":245},"Built-in database support with SQL template literals.","/examples/database/readme",{"title":247,"description":248,"category":249,"path":250},"Elysia","Integrate Elysia with Nitro using the server entry.","backend frameworks","/examples/elysia/readme",{"title":252,"description":253,"category":249,"path":254},"Express","Integrate Express with Nitro using the server entry.","/examples/express/readme",{"title":256,"description":257,"category":249,"path":258},"Fastify","Integrate Fastify with Nitro using the server entry.","/examples/fastify/readme",{"title":260,"description":261,"category":228,"path":262},"Hello World","Minimal Nitro server using the web standard fetch handler.","/examples/hello-world/readme",{"title":264,"description":265,"category":249,"path":266},"Hono","Integrate Hono with Nitro using the server entry.","/examples/hono/readme",{"title":268,"description":269,"category":233,"path":270},"Import Alias","Custom import aliases for cleaner module paths.","/examples/import-alias/readme",{"title":272,"description":273,"category":228,"path":274},"Middleware","Request middleware for authentication, logging, and request modification.","/examples/middleware/readme",{"title":276,"description":277,"category":278,"path":279},"Mono JSX","Server-side JSX rendering in Nitro with mono-jsx.","server side rendering","/examples/mono-jsx/readme",{"title":281,"description":282,"category":278,"path":283},"Nano JSX","Server-side JSX rendering in Nitro with nano-jsx.","/examples/nano-jsx/readme",{"title":48,"description":285,"category":228,"path":286},"Extend Nitro with custom plugins for hooks and lifecycle events.","/examples/plugins/readme",{"title":288,"description":289,"category":278,"path":290},"Custom Renderer","Build a custom HTML renderer in Nitro with server-side data fetching.","/examples/renderer/readme",{"title":292,"description":293,"category":233,"path":294},"Runtime Config","Environment-aware configuration with runtime access.","/examples/runtime-config/readme",{"title":296,"description":297,"category":228,"path":298},"Server Fetch","Internal server-to-server requests without network overhead.","/examples/server-fetch/readme",{"title":300,"description":301,"category":302,"path":303},"Shiki","Server-side syntax highlighting in Nitro with Shiki.","integrations","/examples/shiki/readme",{"title":305,"description":306,"category":228,"path":307},"Virtual Routes","Define routes programmatically using Nitro's virtual module system.","/examples/virtual-routes/readme",{"title":309,"description":310,"category":311,"path":312},"Vite Nitro Plugin","Use Nitro as a Vite plugin for programmatic configuration.","vite","/examples/vite-nitro-plugin/readme",{"title":314,"description":315,"category":311,"path":316},"Vite RSC","React Server Components with Vite and Nitro.","/examples/vite-rsc/readme",{"title":318,"description":319,"category":278,"path":320},"Vite SSR HTML","Server-side rendering with vanilla HTML, Vite, and Nitro.","/examples/vite-ssr-html/readme",{"title":322,"description":323,"category":278,"path":324},"SSR with Preact","Server-side rendering with Preact in Nitro using Vite.","/examples/vite-ssr-preact/readme",{"title":326,"description":327,"category":278,"path":328},"SSR with React","Server-side rendering with React in Nitro using Vite.","/examples/vite-ssr-react/readme",{"title":330,"description":331,"category":278,"path":332},"SSR with SolidJS","Server-side rendering with SolidJS in Nitro using Vite.","/examples/vite-ssr-solid/readme",{"title":334,"description":335,"category":278,"path":336},"SSR with TanStack Router","Client-side routing with TanStack Router in Nitro using Vite.","/examples/vite-ssr-tsr-react/readme",{"title":338,"description":339,"category":278,"path":340},"SSR with TanStack Start","Full-stack React with TanStack Start in Nitro using Vite.","/examples/vite-ssr-tss-react/readme",{"title":342,"description":343,"category":278,"path":344},"SSR with Vue Router","Server-side rendering with Vue Router in Nitro using Vite.","/examples/vite-ssr-vue-router/readme",{"title":346,"description":347,"category":311,"path":348},"Vite + tRPC","End-to-end typesafe APIs with tRPC in Nitro using Vite.","/examples/vite-trpc/readme",{"title":350,"description":351,"category":228,"path":352},"WebSocket","Real-time bidirectional communication with WebSocket support.","/examples/websocket/readme",{"id":354,"title":305,"body":355,"category":228,"description":306,"extension":790,"icon":791,"meta":792,"navigation":793,"path":307,"seo":794,"stem":795,"__hash__":796},"examples/examples/virtual-routes/README.md",{"type":356,"value":357,"toc":786},"minimark",[358,663,667,671,747,762,765,769,782],[359,360,363,486,585,609],"code-tree",{":expand-all":361,"default-value":362,"expand-all":5},"true","nitro.config.ts",[364,365,369],"pre",{"className":366,"code":367,"filename":362,"language":368,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  routes: {\n    \"/\": \"#virtual-route\",\n  },\n  virtual: {\n    \"#virtual-route\": () =>\n      /* js */ `export default () => new Response(\"Hello from virtual entry!\")`,\n  },\n});\n","ts",[370,371,372,395,402,418,424,439,445,451,463,475,480],"code",{"__ignoreMap":5},[373,374,377,381,385,388,392],"span",{"class":375,"line":376},"line",1,[373,378,380],{"class":379},"so5gQ","import",[373,382,384],{"class":383},"slsVL"," { defineConfig } ",[373,386,387],{"class":379},"from",[373,389,391],{"class":390},"sfrk1"," \"nitro\"",[373,393,394],{"class":383},";\n",[373,396,398],{"class":375,"line":397},2,[373,399,401],{"emptyLinePlaceholder":400},true,"\n",[373,403,405,408,411,415],{"class":375,"line":404},3,[373,406,407],{"class":379},"export",[373,409,410],{"class":379}," default",[373,412,414],{"class":413},"shcOC"," defineConfig",[373,416,417],{"class":383},"({\n",[373,419,421],{"class":375,"line":420},4,[373,422,423],{"class":383},"  routes: {\n",[373,425,427,430,433,436],{"class":375,"line":426},5,[373,428,429],{"class":390},"    \"/\"",[373,431,432],{"class":383},": ",[373,434,435],{"class":390},"\"#virtual-route\"",[373,437,438],{"class":383},",\n",[373,440,442],{"class":375,"line":441},6,[373,443,444],{"class":383},"  },\n",[373,446,448],{"class":375,"line":447},7,[373,449,450],{"class":383},"  virtual: {\n",[373,452,454,457,460],{"class":375,"line":453},8,[373,455,456],{"class":390},"    \"#virtual-route\"",[373,458,459],{"class":383},": () ",[373,461,462],{"class":379},"=>\n",[373,464,466,470,473],{"class":375,"line":465},9,[373,467,469],{"class":468},"sCsY4","      /* js */",[373,471,472],{"class":390}," `export default () => new Response(\"Hello from virtual entry!\")`",[373,474,438],{"class":383},[373,476,478],{"class":375,"line":477},10,[373,479,444],{"class":383},[373,481,483],{"class":375,"line":482},11,[373,484,485],{"class":383},"});\n",[364,487,492],{"className":488,"code":489,"filename":490,"language":491,"meta":5,"style":5},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"nitro build\",\n    \"dev\": \"nitro dev\",\n    \"preview\": \"node .output/server/index.mjs\"\n  },\n  \"devDependencies\": {\n    \"nitro\": \"latest\"\n  }\n}\n","package.json","json",[370,493,494,499,512,520,532,544,554,558,565,575,580],{"__ignoreMap":5},[373,495,496],{"class":375,"line":376},[373,497,498],{"class":383},"{\n",[373,500,501,505,507,510],{"class":375,"line":397},[373,502,504],{"class":503},"suiK_","  \"type\"",[373,506,432],{"class":383},[373,508,509],{"class":390},"\"module\"",[373,511,438],{"class":383},[373,513,514,517],{"class":375,"line":404},[373,515,516],{"class":503},"  \"scripts\"",[373,518,519],{"class":383},": {\n",[373,521,522,525,527,530],{"class":375,"line":420},[373,523,524],{"class":503},"    \"build\"",[373,526,432],{"class":383},[373,528,529],{"class":390},"\"nitro build\"",[373,531,438],{"class":383},[373,533,534,537,539,542],{"class":375,"line":426},[373,535,536],{"class":503},"    \"dev\"",[373,538,432],{"class":383},[373,540,541],{"class":390},"\"nitro dev\"",[373,543,438],{"class":383},[373,545,546,549,551],{"class":375,"line":441},[373,547,548],{"class":503},"    \"preview\"",[373,550,432],{"class":383},[373,552,553],{"class":390},"\"node .output/server/index.mjs\"\n",[373,555,556],{"class":375,"line":447},[373,557,444],{"class":383},[373,559,560,563],{"class":375,"line":453},[373,561,562],{"class":503},"  \"devDependencies\"",[373,564,519],{"class":383},[373,566,567,570,572],{"class":375,"line":465},[373,568,569],{"class":503},"    \"nitro\"",[373,571,432],{"class":383},[373,573,574],{"class":390},"\"latest\"\n",[373,576,577],{"class":375,"line":477},[373,578,579],{"class":383},"  }\n",[373,581,582],{"class":375,"line":482},[373,583,584],{"class":383},"}\n",[364,586,589],{"className":488,"code":587,"filename":588,"language":491,"meta":5,"style":5},"{\n  \"extends\": \"nitro/tsconfig\"\n}\n","tsconfig.json",[370,590,591,595,605],{"__ignoreMap":5},[373,592,593],{"class":375,"line":376},[373,594,498],{"class":383},[373,596,597,600,602],{"class":375,"line":397},[373,598,599],{"class":503},"  \"extends\"",[373,601,432],{"class":383},[373,603,604],{"class":390},"\"nitro/tsconfig\"\n",[373,606,607],{"class":375,"line":404},[373,608,584],{"class":383},[364,610,613],{"className":366,"code":611,"filename":612,"language":368,"meta":5,"style":5},"import { defineConfig } from \"vite\";\nimport { nitro } from \"nitro/vite\";\n\nexport default defineConfig({ plugins: [nitro()] });\n","vite.config.ts",[370,614,615,628,642,646],{"__ignoreMap":5},[373,616,617,619,621,623,626],{"class":375,"line":376},[373,618,380],{"class":379},[373,620,384],{"class":383},[373,622,387],{"class":379},[373,624,625],{"class":390}," \"vite\"",[373,627,394],{"class":383},[373,629,630,632,635,637,640],{"class":375,"line":397},[373,631,380],{"class":379},[373,633,634],{"class":383}," { nitro } ",[373,636,387],{"class":379},[373,638,639],{"class":390}," \"nitro/vite\"",[373,641,394],{"class":383},[373,643,644],{"class":375,"line":404},[373,645,401],{"emptyLinePlaceholder":400},[373,647,648,650,652,654,657,660],{"class":375,"line":420},[373,649,407],{"class":379},[373,651,410],{"class":379},[373,653,414],{"class":413},[373,655,656],{"class":383},"({ plugins: [",[373,658,659],{"class":413},"nitro",[373,661,662],{"class":383},"()] });\n",[664,665,666],"p",{},"Virtual routes let you define handlers as strings in your config instead of creating separate files. This is useful when generating routes dynamically, building plugins, or keeping simple routes inline.",[668,669,33],"h2",{"id":670},"configuration",[364,672,673],{"className":366,"code":367,"filename":362,"language":368,"meta":5,"style":5},[370,674,675,687,691,701,705,715,719,723,731,739,743],{"__ignoreMap":5},[373,676,677,679,681,683,685],{"class":375,"line":376},[373,678,380],{"class":379},[373,680,384],{"class":383},[373,682,387],{"class":379},[373,684,391],{"class":390},[373,686,394],{"class":383},[373,688,689],{"class":375,"line":397},[373,690,401],{"emptyLinePlaceholder":400},[373,692,693,695,697,699],{"class":375,"line":404},[373,694,407],{"class":379},[373,696,410],{"class":379},[373,698,414],{"class":413},[373,700,417],{"class":383},[373,702,703],{"class":375,"line":420},[373,704,423],{"class":383},[373,706,707,709,711,713],{"class":375,"line":426},[373,708,429],{"class":390},[373,710,432],{"class":383},[373,712,435],{"class":390},[373,714,438],{"class":383},[373,716,717],{"class":375,"line":441},[373,718,444],{"class":383},[373,720,721],{"class":375,"line":447},[373,722,450],{"class":383},[373,724,725,727,729],{"class":375,"line":453},[373,726,456],{"class":390},[373,728,459],{"class":383},[373,730,462],{"class":379},[373,732,733,735,737],{"class":375,"line":465},[373,734,469],{"class":468},[373,736,472],{"class":390},[373,738,438],{"class":383},[373,740,741],{"class":375,"line":477},[373,742,444],{"class":383},[373,744,745],{"class":375,"line":482},[373,746,485],{"class":383},[664,748,749,750,753,754,757,758,761],{},"The ",[370,751,752],{},"routes"," option maps URL paths to virtual module identifiers (prefixed with ",[370,755,756],{},"#","). The ",[370,759,760],{},"virtual"," option defines the module content as a string or function returning a string. At build time, Nitro resolves these virtual modules to actual handlers.",[664,763,764],{},"There are no route files in this project. The entire handler is defined inline in the config, and Nitro generates the route at build time.",[668,766,768],{"id":767},"learn-more","Learn More",[770,771,772,778],"ul",{},[773,774,775],"li",{},[776,777,23],"a",{"href":24},[773,779,780],{},[776,781,33],{"href":34},[783,784,785],"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 .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}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 .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}",{"title":5,"searchDepth":397,"depth":397,"links":787},[788,789],{"id":670,"depth":397,"text":33},{"id":767,"depth":397,"text":768},"md","i-lucide-box",{"automd":400},{},{"title":305,"description":306},"examples/virtual-routes/README","VL2fd-tPhIvh29EApvuliKYXNNQI8chw_Eg3uzB9G7I",[798,801],{"title":296,"path":799,"stem":800,"description":297,"children":-1},"/examples/server-fetch","examples/server-fetch/README",{"title":350,"path":802,"stem":803,"description":351,"children":-1},"/examples/websocket","examples/websocket/README",1773050454540]