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