[{"data":1,"prerenderedAt":643},["ShallowReactive",2],{"navigation":3,"-deploy-providers-azure":234,"-deploy-providers-azure-surround":638},[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":149,"body":236,"description":632,"extension":633,"meta":634,"navigation":635,"path":150,"seo":636,"stem":151,"__hash__":637},"content/2.deploy/20.providers/azure.md",{"type":237,"value":238,"toc":624},"minimark",[239,244,256,261,273,290,295,304,307,364,367,380,385,388,487,491,498,501,505,508,511,555,558,609,612,620],[240,241,243],"h2",{"id":242},"azure-static-web-apps","Azure static web apps",[245,246,247,251,252],"p",{},[248,249,250],"strong",{},"Preset:"," ",[253,254,255],"code",{},"azure-swa",[257,258],"read-more",{"title":259,"to":260},"Azure Static Web Apps","https://azure.microsoft.com/en-us/products/app-service/static",[262,263,264],"note",{},[245,265,266,267,272],{},"Integration with this provider is possible with ",[268,269,271],"a",{"href":270},"/deploy/#zero-config-providers","zero configuration",".",[245,274,275,279,280,285,286,289],{},[268,276,259],{"href":260,"rel":277},[278],"nofollow"," are designed to be deployed continuously in a ",[268,281,284],{"href":282,"rel":283},"https://docs.microsoft.com/en-us/azure/static-web-apps/github-actions-workflow",[278],"GitHub Actions workflow",". By default, Nitro will detect this deployment environment and enable the ",[253,287,288],{},"azure"," preset.",[291,292,294],"h3",{"id":293},"local-preview","Local preview",[245,296,297,298,303],{},"Install ",[268,299,302],{"href":300,"rel":301},"https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local",[278],"Azure Functions Core Tools"," if you want to test locally.",[245,305,306],{},"You can invoke a development environment to preview before deploying.",[308,309,314],"pre",{"className":310,"code":311,"language":312,"meta":313,"style":313},"language-bash shiki shiki-themes github-light github-dark github-dark","NITRO_PRESET=azure npx nypm@latest build\nnpx @azure/static-web-apps-cli start .output/public --api-location .output/server\n","bash","",[253,315,316,342],{"__ignoreMap":313},[317,318,321,325,329,332,336,339],"span",{"class":319,"line":320},"line",1,[317,322,324],{"class":323},"slsVL","NITRO_PRESET",[317,326,328],{"class":327},"so5gQ","=",[317,330,288],{"class":331},"sfrk1",[317,333,335],{"class":334},"shcOC"," npx",[317,337,338],{"class":331}," nypm@latest",[317,340,341],{"class":331}," build\n",[317,343,345,348,351,354,357,361],{"class":319,"line":344},2,[317,346,347],{"class":334},"npx",[317,349,350],{"class":331}," @azure/static-web-apps-cli",[317,352,353],{"class":331}," start",[317,355,356],{"class":331}," .output/public",[317,358,360],{"class":359},"suiK_"," --api-location",[317,362,363],{"class":331}," .output/server\n",[291,365,67],{"id":366},"configuration",[245,368,369,370,375,376,379],{},"Azure Static Web Apps are ",[268,371,374],{"href":372,"rel":373},"https://learn.microsoft.com/en-us/azure/static-web-apps/configuration",[278],"configured"," using the ",[253,377,378],{},"staticwebapp.config.json"," file.",[245,381,382,383,289],{},"Nitro automatically generates this configuration file whenever the application is built with the ",[253,384,288],{},[245,386,387],{},"Nitro will automatically add the following properties based on the following criteria:",[389,390,391,407],"table",{},[392,393,394],"thead",{},[395,396,397,401,404],"tr",{},[398,399,400],"th",{},"Property",[398,402,403],{},"Criteria",[398,405,406],{},"Default",[408,409,410,437,458],"tbody",{},[395,411,412,422,433],{},[413,414,415],"td",{},[248,416,417],{},[268,418,421],{"href":419,"rel":420},"https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#platform",[278],"platform.apiRuntime",[413,423,424,425,428,429,432],{},"Will automatically set to ",[253,426,427],{},"node:16"," or ",[253,430,431],{},"node:14"," depending on your package configuration.",[413,434,435],{},[253,436,427],{},[395,438,439,448,454],{},[413,440,441],{},[248,442,443],{},[268,444,447],{"href":445,"rel":446},"https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#fallback-routes",[278],"navigationFallback.rewrite",[413,449,450,451],{},"Is always ",[253,452,453],{},"/api/server",[413,455,456],{},[253,457,453],{},[395,459,460,469,482],{},[413,461,462],{},[248,463,464],{},[268,465,468],{"href":466,"rel":467},"https://learn.microsoft.com/en-us/azure/static-web-apps/configuration#routes",[278],"routes",[413,470,471,472,475,476,479,480,272],{},"All prerendered routes are added. Additionally, if you do not have an ",[253,473,474],{},"index.html"," file an empty one is created for you for compatibility purposes and also requests to ",[253,477,478],{},"/index.html"," are redirected to the root directory which is handled by ",[253,481,453],{},[413,483,484],{},[253,485,486],{},"[]",[291,488,490],{"id":489},"custom-configuration","Custom configuration",[245,492,493,494,497],{},"You can alter the Nitro generated configuration using ",[253,495,496],{},"azure.config"," option.",[245,499,500],{},"Custom routes will be added and matched first. In the case of a conflict (determined if an object has the same route property), custom routes will override generated ones.",[291,502,504],{"id":503},"deploy-from-cicd-via-github-actions","Deploy from CI/CD via GitHub actions",[245,506,507],{},"When you link your GitHub repository to Azure Static Web Apps, a workflow file is added to the repository.",[245,509,510],{},"When you are asked to select your framework, select custom and provide the following information:",[389,512,513,523],{},[392,514,515],{},[395,516,517,520],{},[398,518,519],{},"Input",[398,521,522],{},"Value",[408,524,525,535,545],{},[395,526,527,532],{},[413,528,529],{},[248,530,531],{},"app_location",[413,533,534],{},"'/'",[395,536,537,542],{},[413,538,539],{},[248,540,541],{},"api_location",[413,543,544],{},"'.output/server'",[395,546,547,552],{},[413,548,549],{},[248,550,551],{},"output_location",[413,553,554],{},"'.output/public'",[245,556,557],{},"If you miss this step, you can always find the build configuration section in your workflow and update the build configuration:",[308,559,564],{"className":560,"code":561,"filename":562,"language":563,"meta":313,"style":313},"language-yaml shiki shiki-themes github-light github-dark github-dark","###### Repository/Build Configurations ######\napp_location: '/'\napi_location: '.output/server'\noutput_location: '.output/public'\n###### End of Repository/Build Configurations ######\n",".github/workflows/azure-static-web-apps-\u003CRANDOM_NAME>.yml","yaml",[253,565,566,572,583,593,603],{"__ignoreMap":313},[317,567,568],{"class":319,"line":320},[317,569,571],{"class":570},"sCsY4","###### Repository/Build Configurations ######\n",[317,573,574,577,580],{"class":319,"line":344},[317,575,531],{"class":576},"sByVh",[317,578,579],{"class":323},": ",[317,581,582],{"class":331},"'/'\n",[317,584,586,588,590],{"class":319,"line":585},3,[317,587,541],{"class":576},[317,589,579],{"class":323},[317,591,592],{"class":331},"'.output/server'\n",[317,594,596,598,600],{"class":319,"line":595},4,[317,597,551],{"class":576},[317,599,579],{"class":323},[317,601,602],{"class":331},"'.output/public'\n",[317,604,606],{"class":319,"line":605},5,[317,607,608],{"class":570},"###### End of Repository/Build Configurations ######\n",[245,610,611],{},"That's it! Now Azure Static Web Apps will automatically deploy your Nitro-powered application on push.",[245,613,614,615,272],{},"If you are using runtimeConfig, you will likely want to configure the corresponding ",[268,616,619],{"href":617,"rel":618},"https://docs.microsoft.com/en-us/azure/static-web-apps/application-settings",[278],"environment variables on Azure",[621,622,623],"style",{},"html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}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);}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sByVh, html code.shiki .sByVh{--shiki-light:#22863A;--shiki-default:#85E89D;--shiki-dark:#85E89D}",{"title":313,"searchDepth":344,"depth":344,"links":625},[626],{"id":242,"depth":344,"text":243,"children":627},[628,629,630,631],{"id":293,"depth":585,"text":294},{"id":366,"depth":585,"text":67},{"id":489,"depth":585,"text":490},{"id":503,"depth":585,"text":504},"Deploy Nitro apps to Azure Static Web apps or functions.","md",{},{},{"title":149,"description":632},"_ziLV4_9x-aU8lxEd5iUyff7nvgZ1rMj9jc9mk35XMg",[639,641],{"title":145,"path":146,"stem":147,"description":640,"children":-1},"Deploy Nitro apps to AWS Amplify Hosting.",{"title":153,"path":154,"stem":155,"description":642,"children":-1},"Deploy Nitro apps to Cleavr.",1778145698952]