[{"data":1,"prerenderedAt":544},["ShallowReactive",2],{"navigation":3,"-guide":234,"-guide-surround":541},[4,81,228],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","/guide","1.guide/0.index",[9,11,16,21,26,31,36,41,46,51,56,61,66,71,76],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Migration Guide","/guide/migration","1.guide/00.migration","ri:arrow-right-up-line",{"title":17,"path":18,"stem":19,"icon":20},"Server Utils","/guide/utils","1.guide/1.utils","ri:tools-line",{"title":22,"path":23,"stem":24,"icon":25},"Tasks","/guide/tasks","1.guide/10.tasks","codicon:run-all",{"title":27,"path":28,"stem":29,"icon":30},"Server Routes","/guide/routing","1.guide/2.routing","ri:direction-line",{"title":32,"path":33,"stem":34,"icon":35},"WebSocket","/guide/websocket","1.guide/3.websocket","cib:socket-io",{"title":37,"path":38,"stem":39,"icon":40},"KV Storage","/guide/storage","1.guide/4.storage","carbon:datastore",{"title":42,"path":43,"stem":44,"icon":45},"SQL Database","/guide/database","1.guide/5.database","ri:database-2-line",{"title":47,"path":48,"stem":49,"icon":50},"Cache","/guide/cache","1.guide/6.cache","ri:speed-line",{"title":52,"path":53,"stem":54,"icon":55},"Fetch","/guide/fetch","1.guide/7.fetch","ri:global-line",{"title":57,"path":58,"stem":59,"icon":60},"Assets","/guide/assets","1.guide/8.assets","ri:image-2-line",{"title":62,"path":63,"stem":64,"icon":65},"Plugins","/guide/plugins","1.guide/9.plugins","ri:plug-line",{"title":67,"path":68,"stem":69,"icon":70},"Configuration","/guide/configuration","1.guide/97.configuration","ri:settings-3-line",{"title":72,"path":73,"stem":74,"icon":75},"TypeScript","/guide/typescript","1.guide/98.typescript","tabler:brand-typescript",{"title":77,"path":78,"stem":79,"icon":80},"Nightly Channel","/guide/nightly","1.guide/99.nightly","ri:moon-fill",{"title":82,"path":83,"stem":84,"children":85,"icon":87},"Overview","/deploy","2.deploy/0.index",[86,88,92,122,127],{"title":82,"path":83,"stem":84,"icon":87},"ri:upload-cloud-2-line",{"title":89,"path":90,"stem":91,"icon":55},"Edge Workers","/deploy/workers","2.deploy/1.workers",{"title":93,"path":94,"stem":95,"children":96,"page":121},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[97,102,106,111,116],{"title":98,"path":99,"stem":100,"icon":101},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":103,"path":104,"stem":105,"icon":25},"Dir","/deploy/runtimes/_dir","2.deploy/10.runtimes/_dir",{"title":107,"path":108,"stem":109,"icon":110},"WinterJS","/deploy/runtimes/_winterjs","2.deploy/10.runtimes/_winterjs","game-icons:cold-heart",{"title":112,"path":113,"stem":114,"icon":115},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":117,"path":118,"stem":119,"icon":120},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":123,"path":124,"stem":125,"icon":126},"Custom Preset","/deploy/custom-presets","2.deploy/2.custom-presets","ri:file-code-line",{"title":128,"path":129,"stem":130,"children":131,"page":121},"Providers","/deploy/providers","2.deploy/20.providers",[132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224],{"title":103,"path":133,"stem":134,"icon":135},"/deploy/providers/_dir","2.deploy/20.providers/_dir","tdesign:cloud",{"title":137,"path":138,"stem":139},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":141,"path":142,"stem":143},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":145,"path":146,"stem":147},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":149,"path":150,"stem":151},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":153,"path":154,"stem":155},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":157,"path":158,"stem":159},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":161,"path":162,"stem":163},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":165,"path":166,"stem":167},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":169,"path":170,"stem":171},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":173,"path":174,"stem":175},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":177,"path":178,"stem":179},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":181,"path":182,"stem":183},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":185,"path":186,"stem":187},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":189,"path":190,"stem":191},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":193,"path":194,"stem":195},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":197,"path":198,"stem":199},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":201,"path":202,"stem":203},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":205,"path":206,"stem":207},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":209,"path":210,"stem":211},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":213,"path":214,"stem":215},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":217,"path":218,"stem":219},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":221,"path":222,"stem":223},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":225,"path":226,"stem":227},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":229,"path":230,"stem":231,"children":232,"icon":70},"Config","/config","3.config/0.index",[233],{"title":229,"path":230,"stem":231,"icon":70},{"id":235,"title":5,"body":236,"description":535,"extension":536,"meta":537,"navigation":538,"path":6,"seo":539,"stem":7,"__hash__":540},"content/1.guide/0.index.md",{"type":237,"value":238,"toc":520,"icon":10},"minimark",[239,251,256,270,282,286,297,330,333,337,360,363,367,374,383,386,389,396,399,402,413,417,420,426,435,437,443,455,457,463,466,468,474,477,479,485,490,492,498,503,505,511,516],[240,241,242],"important",{},[243,244,245,246,250],"p",{},"\nYou are currently reading Nitro v3 beta docs.\nCheck the ",[247,248,249],"a",{"href":13},"migration guide"," for migrating from Nitro v2.",[252,253,255],"h2",{"id":254},"intro","Intro",[243,257,258,259,265,266,269],{},"Nitro is an open source framework to build web servers using ",[247,260,264],{"href":261,"rel":262},"https://h3.dev/",[263],"nofollow","h3"," and lots of built-in features.\nNitro automatically makes your code compatible with any ",[247,267,268],{"href":83},"deployment"," provider and runtime!",[271,272,273],"note",{},[243,274,275,276,281],{},"\nNitro can be used standalone or as the server engine of full-stack frameworks such as ",[247,277,280],{"href":278,"rel":279},"https://nuxt.com",[263],"Nuxt",".",[252,283,285],{"id":284},"quick-start","Quick start",[287,288,289],"tip",{},[243,290,291,292,281],{},"\nInstead of setting up a local development environment, you can use the ",[247,293,296],{"href":294,"rel":295},"https://stackblitz.com/github/nitrojs/nitro/tree/main/examples/hello-world",[263],"online playground",[271,298,299,302],{},[243,300,301],{},"Make sure you have installed the recommended setup:",[303,304,305,323],"ul",{},[306,307,308,309,313,314,318,319,281],"li",{},"Latest LTS version of either ",[247,310,98],{"href":311,"rel":312},"https://nodejs.org/en",[263],", ",[247,315,112],{"href":316,"rel":317},"https://bun.sh/",[263],", or ",[247,320,117],{"href":321,"rel":322},"https://deno.com/",[263],[306,324,325],{},[247,326,329],{"href":327,"rel":328},"https://code.visualstudio.com/",[263],"Visual Studio Code",[243,331,332],{},"Create a new project using starter template:",[334,335],"pm-x",{"command":336},"giget@latest nitro nitro-app --install",[338,339,344],"pre",{"className":340,"code":341,"language":342,"meta":343,"style":343},"language-sh shiki shiki-themes github-light github-dark github-dark","cd nitro-app\n","sh","",[345,346,347],"code",{"__ignoreMap":343},[348,349,352,356],"span",{"class":350,"line":351},"line",1,[348,353,355],{"class":354},"suiK_","cd",[348,357,359],{"class":358},"sfrk1"," nitro-app\n",[243,361,362],{},"Start the development server:",[364,365],"pm-run",{"script":366},"dev",[243,368,369,370,373],{},"Nitro is ready at ",[345,371,372],{},"http://localhost:3000/","!",[287,375,376],{},[243,377,378,379,382],{},"Check ",[345,380,381],{},".nitro/dev/index.mjs"," if you want to know what is happening",[243,384,385],{},"Build your production-ready server:",[364,387],{"script":388},"build",[243,390,391,392,395],{},"Output is in the ",[345,393,394],{},".output"," directory and ready to be deployed on almost any provider with no dependencies.",[243,397,398],{},"You can try it locally with:",[364,400],{"script":401},"preview",[403,404,405],"read-more",{},[243,406,407,408],{},"You can find more examples in the Nitro repository: ",[247,409,412],{"href":410,"rel":411},"https://github.com/nitrojs/nitro/tree/main/examples",[263],"nitrojs/nitro/examples",[252,414,416],{"id":415},"directory-structure","Directory structure",[243,418,419],{},"The starter template includes some important files to get you started.",[264,421,423],{"id":422},"serverroutes",[345,424,425],{},"server/routes/",[243,427,428,429,431,432,434],{},"The ",[345,430,425],{}," directory contains your application handlers. You can create subdirectories inside ",[345,433,425],{}," dir to create nested handlers. The file name is the route path.",[403,436],{"to":28},[264,438,440],{"id":439},"serverapi",[345,441,442],{},"server/api/",[243,444,428,445,447,448,450,451,454],{},[345,446,442],{}," directory is similar to ",[345,449,425],{}," with the only difference that routes inside it will be prefixed with ",[345,452,453],{},"/api/"," for convenience.",[403,456],{"to":28},[264,458,460],{"id":459},"serverutils",[345,461,462],{},"server/utils/",[243,464,465],{},"This directory contains your application utils with auto import support.",[403,467],{"to":18},[264,469,471],{"id":470},"serverplugins",[345,472,473],{},"server/plugins/",[243,475,476],{},"This directory contains your custom nitro plugins.",[403,478],{"to":63},[264,480,482],{"id":481},"nitroconfigts",[345,483,484],{},"nitro.config.ts",[243,486,428,487,489],{},[345,488,484],{}," file contains the configuration for Nitro.",[403,491],{"to":68},[264,493,495],{"id":494},"tsconfigjson",[345,496,497],{},"tsconfig.json",[243,499,428,500,502],{},[345,501,497],{}," file contains the TypeScript configuration for your project.",[403,504],{"to":73},[264,506,508],{"id":507},"packagejson",[345,509,510],{},"package.json",[243,512,428,513,515],{},[345,514,510],{}," file contains all the dependencies and scripts for your project.",[517,518,519],"style",{},"html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}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":343,"searchDepth":521,"depth":521,"links":522},2,[523,524,525],{"id":254,"depth":521,"text":255},{"id":284,"depth":521,"text":285},{"id":415,"depth":521,"text":416,"children":526},[527,529,530,531,532,533,534],{"id":422,"depth":528,"text":425},3,{"id":439,"depth":528,"text":442},{"id":459,"depth":528,"text":462},{"id":470,"depth":528,"text":473},{"id":481,"depth":528,"text":484},{"id":494,"depth":528,"text":497},{"id":507,"depth":528,"text":510},"Create web servers with all necessary features and deploy them wherever you prefer.","md",{"icon":10},{"icon":10},{"title":5,"description":535},"koUSLbb02SpqafjW1DZKXpbhTRuVtpBjG-T_DlFv7Fg",[542,543],null,{"title":12,"path":13,"stem":14,"description":343,"icon":15,"children":-1},1778145696084]