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