[{"data":1,"prerenderedAt":1452},["ShallowReactive",2],{"navigation":3,"-deploy-providers-firebase":225,"-deploy-providers-firebase-surround":1447},[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":160,"body":227,"description":1441,"extension":1442,"meta":1443,"navigation":1444,"path":161,"seo":1445,"stem":162,"__hash__":1446},"content/2.deploy/20.providers/firebase.md",{"type":228,"value":229,"toc":1427},"minimark",[230,248,253,260,265,276,281,333,336,340,346,355,359,368,372,376,384,390,393,422,438,444,466,477,484,620,628,632,642,651,664,700,703,708,711,715,720,723,727,731,734,766,770,777,796,799,802,814,818,827,838,947,956,965,969,975,1115,1126,1130,1133,1217,1232,1237,1281,1289,1293,1300,1318,1322,1326,1329,1332,1411,1423],[231,232,233],"note",{},[234,235,236,237,247],"p",{},"You will need to be on the ",[238,239,243],"a",{"href":240,"rel":241},"https://firebase.google.com/pricing",[242],"nofollow",[244,245,246],"strong",{},"Blaze plan"," (Pay as you go) to get started.",[249,250,252],"h2",{"id":251},"firebase-app-hosting","Firebase app hosting",[234,254,255,256],{},"Preset: ",[257,258,259],"code",{},"firebase_app_hosting",[261,262],"read-more",{"title":263,"to":264},"Firebase App Hosting","https://firebase.google.com/docs/app-hosting",[266,267,268],"tip",{},[234,269,270,271,275],{},"You can integrate with this provider using ",[238,272,274],{"href":273},"/deploy/#zero-config-providers","zero configuration",".",[277,278,280],"h3",{"id":279},"project-setup","Project setup",[282,283,285,295,309,330],"steps",{"level":284},"4",[286,287,288,289,294],"h4",{},"Go to the Firebase ",[238,290,293],{"href":291,"rel":292},"https://console.firebase.google.com/",[242],"console"," and set up a new project.",[286,296,297,298,301,302],{},"Select ",[244,299,300],{},"Build > App Hosting"," from the sidebar.\n",[303,304,305],"ul",{},[306,307,308],"li",{},"You may need to upgrade your billing plan at this step.",[286,310,311,312,315,316],{},"Click ",[244,313,314],{},"Get Started",".\n",[303,317,318,321,324,327],{},[306,319,320],{},"Choose a region.",[306,322,323],{},"Import a GitHub repository (you’ll need to link your GitHub account).",[306,325,326],{},"Configure deployment settings (project root directory and branch), and enable automatic rollouts.",[306,328,329],{},"Choose a unique ID for your backend.",[286,331,332],{},"Click Finish & Deploy to create your first rollout.",[234,334,335],{},"When you deploy with Firebase App Hosting, the App Hosting preset will be run automatically at build time.",[249,337,339],{"id":338},"firebase-hosting-deprecated","Firebase hosting (deprecated)",[341,342,343],"important",{},[234,344,345],{},"This deployment method is deprecated and is not recommended. Firebase App Hosting is the recommended way to deploy Nitro apps on Firebase.",[234,347,348,351,352],{},[244,349,350],{},"Preset:"," ",[257,353,354],{},"firebase",[261,356],{"title":357,"to":358},"Firebase Hosting","https://firebase.google.com/docs/hosting",[341,360,361],{},[234,362,363,364,275],{},"This preset will deploy to firebase functions 1st gen by default. If you want to deploy to firebase functions 2nd gen, see the ",[238,365,367],{"href":366},"#using-2nd-generation-firebase-functions","instructions below",[277,369,371],{"id":370},"project-setup-1","Project Setup",[286,373,375],{"id":374},"using-firebase-cli-recommended","Using firebase CLI (recommended)",[234,377,378,379,275],{},"You may instead prefer to set up your project with the Firebase CLI, which will fetch your project ID for you, add required dependencies (see above) and even set up automated deployments via GitHub Actions (for hosting only). ",[238,380,383],{"href":381,"rel":382},"https://firebase.google.com/docs/cli#windows-npm",[242],"Learn about installing the firebase CLI",[385,386,387],"ol",{},[306,388,389],{},"Install firebase CLI globally",[234,391,392],{},"Always try to use the latest version of the Firebase CLI.",[394,395,400],"pre",{"className":396,"code":397,"language":398,"meta":399,"style":399},"language-bash shiki shiki-themes github-light github-dark github-dark","npm install -g firebase-tools@latest\n","bash","",[257,401,402],{"__ignoreMap":399},[403,404,407,411,415,419],"span",{"class":405,"line":406},"line",1,[403,408,410],{"class":409},"shcOC","npm",[403,412,414],{"class":413},"sfrk1"," install",[403,416,418],{"class":417},"suiK_"," -g",[403,420,421],{"class":413}," firebase-tools@latest\n",[234,423,424,427,428,433,434,437],{},[244,425,426],{},"Note",": You need to be on ",[238,429,432],{"href":430,"rel":431},"https://github.com/firebase/firebase-tools/releases/tag/v11.18.0",[242],"^11.18.0"," to deploy a ",[257,435,436],{},"nodejs18"," function.",[385,439,441],{"start":440},2,[306,442,443],{},"Initialize your firebase project",[394,445,447],{"className":396,"code":446,"language":398,"meta":399,"style":399},"firebase login\nfirebase init hosting\n",[257,448,449,456],{"__ignoreMap":399},[403,450,451,453],{"class":405,"line":406},[403,452,354],{"class":409},[403,454,455],{"class":413}," login\n",[403,457,458,460,463],{"class":405,"line":440},[403,459,354],{"class":409},[403,461,462],{"class":413}," init",[403,464,465],{"class":413}," hosting\n",[234,467,468,469,472,473,476],{},"When prompted, you can enter ",[257,470,471],{},".output/public"," as the public directory. In the next step, ",[244,474,475],{},"do not"," configure your project as a single-page app.",[234,478,479,480,483],{},"Once complete, add the following to your ",[257,481,482],{},"firebase.json"," to enable server rendering in Cloud Functions:",[394,485,489],{"className":486,"code":487,"filename":482,"language":488,"meta":399,"style":399},"language-json shiki shiki-themes github-light github-dark github-dark","{\n  \"functions\": { \"source\": \".output/server\" },\n  \"hosting\": [\n    {\n      \"site\": \"\u003Cyour_project_id>\",\n      \"public\": \".output/public\",\n      \"cleanUrls\": true,\n      \"rewrites\": [{ \"source\": \"**\", \"function\": \"server\" }]\n    }\n  ]\n}\n","json",[257,490,491,497,517,526,532,546,559,572,602,608,614],{"__ignoreMap":399},[403,492,493],{"class":405,"line":406},[403,494,496],{"class":495},"slsVL","{\n",[403,498,499,502,505,508,511,514],{"class":405,"line":440},[403,500,501],{"class":417},"  \"functions\"",[403,503,504],{"class":495},": { ",[403,506,507],{"class":417},"\"source\"",[403,509,510],{"class":495},": ",[403,512,513],{"class":413},"\".output/server\"",[403,515,516],{"class":495}," },\n",[403,518,520,523],{"class":405,"line":519},3,[403,521,522],{"class":417},"  \"hosting\"",[403,524,525],{"class":495},": [\n",[403,527,529],{"class":405,"line":528},4,[403,530,531],{"class":495},"    {\n",[403,533,535,538,540,543],{"class":405,"line":534},5,[403,536,537],{"class":417},"      \"site\"",[403,539,510],{"class":495},[403,541,542],{"class":413},"\"\u003Cyour_project_id>\"",[403,544,545],{"class":495},",\n",[403,547,549,552,554,557],{"class":405,"line":548},6,[403,550,551],{"class":417},"      \"public\"",[403,553,510],{"class":495},[403,555,556],{"class":413},"\".output/public\"",[403,558,545],{"class":495},[403,560,562,565,567,570],{"class":405,"line":561},7,[403,563,564],{"class":417},"      \"cleanUrls\"",[403,566,510],{"class":495},[403,568,569],{"class":417},"true",[403,571,545],{"class":495},[403,573,575,578,581,583,585,588,591,594,596,599],{"class":405,"line":574},8,[403,576,577],{"class":417},"      \"rewrites\"",[403,579,580],{"class":495},": [{ ",[403,582,507],{"class":417},[403,584,510],{"class":495},[403,586,587],{"class":413},"\"**\"",[403,589,590],{"class":495},", ",[403,592,593],{"class":417},"\"function\"",[403,595,510],{"class":495},[403,597,598],{"class":413},"\"server\"",[403,600,601],{"class":495}," }]\n",[403,603,605],{"class":405,"line":604},9,[403,606,607],{"class":495},"    }\n",[403,609,611],{"class":405,"line":610},10,[403,612,613],{"class":495},"  ]\n",[403,615,617],{"class":405,"line":616},11,[403,618,619],{"class":495},"}\n",[234,621,622,623,275],{},"You can find more details in the ",[238,624,627],{"href":625,"rel":626},"https://firebase.google.com/docs/hosting/quickstart",[242],"Firebase documentation",[286,629,631],{"id":630},"alternative-method","Alternative method",[234,633,634,635,637,638,641],{},"If you don't already have a ",[257,636,482],{}," in your root directory, Nitro will create one the first time you run it. In this file, you will need to replace ",[257,639,640],{},"\u003Cyour_project_id>"," with the ID of your Firebase project. This file should then be committed to the git.",[385,643,644],{},[306,645,646,647,650],{},"Create a ",[257,648,649],{},".firebaserc"," file",[234,652,653,654,656,657,659,660,663],{},"It is recommended to create a ",[257,655,649],{}," file so you don't need to manually pass your project ID to your ",[257,658,354],{}," commands (with ",[257,661,662],{},"--project \u003Cyour_project_id>","):",[394,665,667],{"className":486,"code":666,"filename":649,"language":488,"meta":399,"style":399},"{\n  \"projects\": {\n    \"default\": \"\u003Cyour_project_id>\"\n  }\n}\n",[257,668,669,673,681,691,696],{"__ignoreMap":399},[403,670,671],{"class":405,"line":406},[403,672,496],{"class":495},[403,674,675,678],{"class":405,"line":440},[403,676,677],{"class":417},"  \"projects\"",[403,679,680],{"class":495},": {\n",[403,682,683,686,688],{"class":405,"line":519},[403,684,685],{"class":417},"    \"default\"",[403,687,510],{"class":495},[403,689,690],{"class":413},"\"\u003Cyour_project_id>\"\n",[403,692,693],{"class":405,"line":528},[403,694,695],{"class":495},"  }\n",[403,697,698],{"class":405,"line":534},[403,699,619],{"class":495},[234,701,702],{},"This file is usually generated when you initialize your project with the Firebase CLI. But if you don't have one, you can create it manually.",[385,704,705],{"start":440},[306,706,707],{},"Install firebase dependencies",[234,709,710],{},"Then, add Firebase dependencies to your project:",[712,713],"pm-install",{":dev":569,"name":714},"firebase-admin firebase-functions firebase-functions-test",[385,716,717],{"start":519},[306,718,719],{},"Log into the firebase CLI",[234,721,722],{},"Make sure you are authenticated with the firebase cli. Run this command and follow the prompts:",[724,725],"pm-x",{"command":726},"firebase-tools login",[277,728,730],{"id":729},"local-preview","Local preview",[234,732,733],{},"You can preview a local version of your site if you need to test things out without deploying.",[394,735,737],{"className":396,"code":736,"language":398,"meta":399,"style":399},"NITRO_PRESET=firebase npm run build\nfirebase emulators:start\n",[257,738,739,759],{"__ignoreMap":399},[403,740,741,744,748,750,753,756],{"class":405,"line":406},[403,742,743],{"class":495},"NITRO_PRESET",[403,745,747],{"class":746},"so5gQ","=",[403,749,354],{"class":413},[403,751,752],{"class":409}," npm",[403,754,755],{"class":413}," run",[403,757,758],{"class":413}," build\n",[403,760,761,763],{"class":405,"line":440},[403,762,354],{"class":409},[403,764,765],{"class":413}," emulators:start\n",[277,767,769],{"id":768},"build-and-deploy","Build and deploy",[234,771,772,773,776],{},"Deploy to Firebase Hosting by running a Nitro build and then running the ",[257,774,775],{},"firebase deploy"," command.",[394,778,780],{"className":396,"code":779,"language":398,"meta":399,"style":399},"NITRO_PRESET=firebase npm run build\n",[257,781,782],{"__ignoreMap":399},[403,783,784,786,788,790,792,794],{"class":405,"line":406},[403,785,743],{"class":495},[403,787,747],{"class":746},[403,789,354],{"class":413},[403,791,752],{"class":409},[403,793,755],{"class":413},[403,795,758],{"class":413},[724,797],{"command":798},"firebase-tools deploy",[234,800,801],{},"If you installed the Firebase CLI globally, you can also run:",[394,803,805],{"className":396,"code":804,"language":398,"meta":399,"style":399},"firebase deploy\n",[257,806,807],{"__ignoreMap":399},[403,808,809,811],{"class":405,"line":406},[403,810,354],{"class":409},[403,812,813],{"class":413}," deploy\n",[277,815,817],{"id":816},"using-2nd-generation-firebase-functions","Using 2nd generation firebase functions",[303,819,820],{},[306,821,822],{},[238,823,826],{"href":824,"rel":825},"https://firebase.google.com/docs/functions/version-comparison",[242],"Comparison between 1st and 2nd generation functions",[234,828,829,830,833,834,837],{},"To switch to the more recent and, recommended generation of firebase functions, set the ",[257,831,832],{},"firebase.gen"," option to ",[257,835,836],{},"2",":",[839,840,841,894],"code-group",{},[394,842,848],{"className":843,"code":844,"filename":845,"highlights":846,"language":847,"meta":399,"style":399},"language-ts shiki shiki-themes github-light github-dark github-dark","export default defineNitroConfig({\n  firebase: {\n    gen: 2\n    // ...\n  }\n})\n","nitro.config.ts",[519],"ts",[257,849,850,864,869,879,885,889],{"__ignoreMap":399},[403,851,852,855,858,861],{"class":405,"line":406},[403,853,854],{"class":746},"export",[403,856,857],{"class":746}," default",[403,859,860],{"class":409}," defineNitroConfig",[403,862,863],{"class":495},"({\n",[403,865,866],{"class":405,"line":440},[403,867,868],{"class":495},"  firebase: {\n",[403,870,873,876],{"class":871,"line":519},[405,872],"highlight",[403,874,875],{"class":495},"    gen: ",[403,877,878],{"class":417},"2\n",[403,880,881],{"class":405,"line":528},[403,882,884],{"class":883},"sCsY4","    // ...\n",[403,886,887],{"class":405,"line":534},[403,888,695],{"class":495},[403,890,891],{"class":405,"line":548},[403,892,893],{"class":495},"})\n",[394,895,899],{"className":843,"code":896,"filename":897,"highlights":898,"language":847,"meta":399,"style":399},"export default defineNuxtConfig({\n  nitro: {\n    firebase: {\n      gen: 2\n      // ...\n    }\n  }\n})\n","nuxt.config.ts",[528],[257,900,901,912,917,922,930,935,939,943],{"__ignoreMap":399},[403,902,903,905,907,910],{"class":405,"line":406},[403,904,854],{"class":746},[403,906,857],{"class":746},[403,908,909],{"class":409}," defineNuxtConfig",[403,911,863],{"class":495},[403,913,914],{"class":405,"line":440},[403,915,916],{"class":495},"  nitro: {\n",[403,918,919],{"class":405,"line":519},[403,920,921],{"class":495},"    firebase: {\n",[403,923,925,928],{"class":924,"line":528},[405,872],[403,926,927],{"class":495},"      gen: ",[403,929,878],{"class":417},[403,931,932],{"class":405,"line":534},[403,933,934],{"class":883},"      // ...\n",[403,936,937],{"class":405,"line":548},[403,938,607],{"class":495},[403,940,941],{"class":405,"line":561},[403,942,695],{"class":495},[403,944,945],{"class":405,"line":574},[403,946,893],{"class":495},[231,948,949],{},[234,950,951,952,955],{},"If you cannot use configuration for any reason, alternatively you can use ",[257,953,954],{},"NITRO_FIREBASE_GEN"," environment variable.",[234,957,958,959,964],{},"If you already have a deployed version of your website and want to upgrade to 2nd gen, ",[238,960,963],{"href":961,"rel":962},"https://firebase.google.com/docs/functions/2nd-gen-upgrade",[242],"see the Migration process on Firebase docs",". Namely, the CLI will ask you to delete your existing functions before deploying the new ones.",[277,966,968],{"id":967},"options","Options",[234,970,971,972,974],{},"You can set options for the firebase functions in your ",[257,973,845],{}," file:",[839,976,977,1044],{},[394,978,980],{"className":843,"code":979,"filename":845,"language":847,"meta":399,"style":399},"export default defineNitroConfig({\n  firebase: {\n    gen: 2,\n    httpsOptions: {\n      region: 'europe-west1',\n      maxInstances: 3,\n    },\n  },\n});\n",[257,981,982,992,996,1004,1009,1019,1029,1034,1039],{"__ignoreMap":399},[403,983,984,986,988,990],{"class":405,"line":406},[403,985,854],{"class":746},[403,987,857],{"class":746},[403,989,860],{"class":409},[403,991,863],{"class":495},[403,993,994],{"class":405,"line":440},[403,995,868],{"class":495},[403,997,998,1000,1002],{"class":405,"line":519},[403,999,875],{"class":495},[403,1001,836],{"class":417},[403,1003,545],{"class":495},[403,1005,1006],{"class":405,"line":528},[403,1007,1008],{"class":495},"    httpsOptions: {\n",[403,1010,1011,1014,1017],{"class":405,"line":534},[403,1012,1013],{"class":495},"      region: ",[403,1015,1016],{"class":413},"'europe-west1'",[403,1018,545],{"class":495},[403,1020,1021,1024,1027],{"class":405,"line":548},[403,1022,1023],{"class":495},"      maxInstances: ",[403,1025,1026],{"class":417},"3",[403,1028,545],{"class":495},[403,1030,1031],{"class":405,"line":561},[403,1032,1033],{"class":495},"    },\n",[403,1035,1036],{"class":405,"line":574},[403,1037,1038],{"class":495},"  },\n",[403,1040,1041],{"class":405,"line":604},[403,1042,1043],{"class":495},"});\n",[394,1045,1047],{"className":843,"code":1046,"filename":897,"language":847,"meta":399,"style":399},"export default defineNuxtConfig({\n  nitro: {\n    firebase: {\n      gen: 2,\n      httpsOptions: {\n        region: 'europe-west1',\n        maxInstances: 3,\n      },\n    },\n  },\n});\n",[257,1048,1049,1059,1063,1067,1075,1080,1089,1098,1103,1107,1111],{"__ignoreMap":399},[403,1050,1051,1053,1055,1057],{"class":405,"line":406},[403,1052,854],{"class":746},[403,1054,857],{"class":746},[403,1056,909],{"class":409},[403,1058,863],{"class":495},[403,1060,1061],{"class":405,"line":440},[403,1062,916],{"class":495},[403,1064,1065],{"class":405,"line":519},[403,1066,921],{"class":495},[403,1068,1069,1071,1073],{"class":405,"line":528},[403,1070,927],{"class":495},[403,1072,836],{"class":417},[403,1074,545],{"class":495},[403,1076,1077],{"class":405,"line":534},[403,1078,1079],{"class":495},"      httpsOptions: {\n",[403,1081,1082,1085,1087],{"class":405,"line":548},[403,1083,1084],{"class":495},"        region: ",[403,1086,1016],{"class":413},[403,1088,545],{"class":495},[403,1090,1091,1094,1096],{"class":405,"line":561},[403,1092,1093],{"class":495},"        maxInstances: ",[403,1095,1026],{"class":417},[403,1097,545],{"class":495},[403,1099,1100],{"class":405,"line":574},[403,1101,1102],{"class":495},"      },\n",[403,1104,1105],{"class":405,"line":604},[403,1106,1033],{"class":495},[403,1108,1109],{"class":405,"line":610},[403,1110,1038],{"class":495},[403,1112,1113],{"class":405,"line":616},[403,1114,1043],{"class":495},[234,1116,1117,1118,1121,1122,1125],{},"You can also set options for 1st generation Cloud Functions if the ",[257,1119,1120],{},"gen"," option is set to ",[257,1123,1124],{},"1",". Note these are different from the options for 2nd generation Cloud Functions.",[286,1127,1129],{"id":1128},"runtime-nodejs-version","Runtime Node.js version",[234,1131,1132],{},"You can set custom Node.js version in configuration:",[839,1134,1135,1173],{},[394,1136,1138],{"className":843,"code":1137,"filename":845,"language":847,"meta":399,"style":399},"export default defineNitroConfig({\n  firebase: {\n    nodeVersion: \"20\" // Can be \"16\", \"18\", \"20\" or \"22\"\n  },\n});\n",[257,1139,1140,1150,1154,1165,1169],{"__ignoreMap":399},[403,1141,1142,1144,1146,1148],{"class":405,"line":406},[403,1143,854],{"class":746},[403,1145,857],{"class":746},[403,1147,860],{"class":409},[403,1149,863],{"class":495},[403,1151,1152],{"class":405,"line":440},[403,1153,868],{"class":495},[403,1155,1156,1159,1162],{"class":405,"line":519},[403,1157,1158],{"class":495},"    nodeVersion: ",[403,1160,1161],{"class":413},"\"20\"",[403,1163,1164],{"class":883}," // Can be \"16\", \"18\", \"20\" or \"22\"\n",[403,1166,1167],{"class":405,"line":528},[403,1168,1038],{"class":495},[403,1170,1171],{"class":405,"line":534},[403,1172,1043],{"class":495},[394,1174,1176],{"className":843,"code":1175,"filename":897,"language":847,"meta":399,"style":399},"export default defineNuxtConfig({\n  nitro: {\n    firebase: {\n      nodeVersion: \"20\" // Can be \"16\", \"18\", \"20\" or \"22\"\n    },\n  },\n});\n",[257,1177,1178,1188,1192,1196,1205,1209,1213],{"__ignoreMap":399},[403,1179,1180,1182,1184,1186],{"class":405,"line":406},[403,1181,854],{"class":746},[403,1183,857],{"class":746},[403,1185,909],{"class":409},[403,1187,863],{"class":495},[403,1189,1190],{"class":405,"line":440},[403,1191,916],{"class":495},[403,1193,1194],{"class":405,"line":519},[403,1195,921],{"class":495},[403,1197,1198,1201,1203],{"class":405,"line":528},[403,1199,1200],{"class":495},"      nodeVersion: ",[403,1202,1161],{"class":413},[403,1204,1164],{"class":883},[403,1206,1207],{"class":405,"line":534},[403,1208,1033],{"class":495},[403,1210,1211],{"class":405,"line":548},[403,1212,1038],{"class":495},[403,1214,1215],{"class":405,"line":561},[403,1216,1043],{"class":495},[234,1218,1219,1220,1223,1224,1227,1228,1231],{},"Firebase tools use the ",[257,1221,1222],{},"engines.node"," version in  ",[257,1225,1226],{},"package.json"," to determine which node version to use for your functions. Nitro automatically writes to the ",[257,1229,1230],{},".output/server/package.json"," with configured Node.js version.",[234,1233,1234,1235,974],{},"You might also need to add a runtime key to your ",[257,1236,482],{},[394,1238,1240],{"className":486,"code":1239,"filename":482,"language":488,"meta":399,"style":399},"{\n  \"functions\": {\n    \"source\": \".output/server\",\n    \"runtime\": \"nodejs20\"\n  }\n}\n",[257,1241,1242,1246,1252,1263,1273,1277],{"__ignoreMap":399},[403,1243,1244],{"class":405,"line":406},[403,1245,496],{"class":495},[403,1247,1248,1250],{"class":405,"line":440},[403,1249,501],{"class":417},[403,1251,680],{"class":495},[403,1253,1254,1257,1259,1261],{"class":405,"line":519},[403,1255,1256],{"class":417},"    \"source\"",[403,1258,510],{"class":495},[403,1260,513],{"class":413},[403,1262,545],{"class":495},[403,1264,1265,1268,1270],{"class":405,"line":528},[403,1266,1267],{"class":417},"    \"runtime\"",[403,1269,510],{"class":495},[403,1271,1272],{"class":413},"\"nodejs20\"\n",[403,1274,1275],{"class":405,"line":534},[403,1276,695],{"class":495},[403,1278,1279],{"class":405,"line":548},[403,1280,619],{"class":495},[234,1282,1283,1284,275],{},"You can read more about this in ",[238,1285,1288],{"href":1286,"rel":1287},"https://firebase.google.com/docs/functions/manage-functions?gen=2nd#set_nodejs_version",[242],"Firebase Docs",[277,1290,1292],{"id":1291},"if-your-firebase-project-has-other-cloud-functions","If your firebase project has other cloud functions",[234,1294,1295,1296,1299],{},"You may be warned that other cloud functions will be deleted when you deploy your nitro project. This is because nitro will deploy your entire project to firebase functions. If you want to deploy only your nitro project, you can use the ",[257,1297,1298],{},"--only"," flag:",[394,1301,1303],{"className":396,"code":1302,"language":398,"meta":399,"style":399},"firebase deploy --only functions:server,hosting\n",[257,1304,1305],{"__ignoreMap":399},[403,1306,1307,1309,1312,1315],{"class":405,"line":406},[403,1308,354],{"class":409},[403,1310,1311],{"class":413}," deploy",[403,1313,1314],{"class":417}," --only",[403,1316,1317],{"class":413}," functions:server,hosting\n",[277,1319,1321],{"id":1320},"advanced","Advanced",[286,1323,1325],{"id":1324},"renaming-function","Renaming function",[234,1327,1328],{},"When deploying multiple apps within the same Firebase project, you must give your server a unique name in order to avoid overwriting\nyour functions.",[234,1330,1331],{},"You can specify a new name for the deployed Firebase function in your configuration:",[839,1333,1334,1369],{},[394,1335,1337],{"className":843,"code":1336,"filename":845,"language":847,"meta":399,"style":399},"export default defineNitroConfig({\n  firebase: {\n    serverFunctionName: \"\u003Cnew_function_name>\"\n  }\n})\n",[257,1338,1339,1349,1353,1361,1365],{"__ignoreMap":399},[403,1340,1341,1343,1345,1347],{"class":405,"line":406},[403,1342,854],{"class":746},[403,1344,857],{"class":746},[403,1346,860],{"class":409},[403,1348,863],{"class":495},[403,1350,1351],{"class":405,"line":440},[403,1352,868],{"class":495},[403,1354,1355,1358],{"class":405,"line":519},[403,1356,1357],{"class":495},"    serverFunctionName: ",[403,1359,1360],{"class":413},"\"\u003Cnew_function_name>\"\n",[403,1362,1363],{"class":405,"line":528},[403,1364,695],{"class":495},[403,1366,1367],{"class":405,"line":534},[403,1368,893],{"class":495},[394,1370,1372],{"className":843,"code":1371,"filename":897,"language":847,"meta":399,"style":399},"export default defineNuxtConfig({\n  nitro: {\n    firebase: {\n      serverFunctionName: \"\u003Cnew_function_name>\"\n    }\n  }\n})\n",[257,1373,1374,1384,1388,1392,1399,1403,1407],{"__ignoreMap":399},[403,1375,1376,1378,1380,1382],{"class":405,"line":406},[403,1377,854],{"class":746},[403,1379,857],{"class":746},[403,1381,909],{"class":409},[403,1383,863],{"class":495},[403,1385,1386],{"class":405,"line":440},[403,1387,916],{"class":495},[403,1389,1390],{"class":405,"line":519},[403,1391,921],{"class":495},[403,1393,1394,1397],{"class":405,"line":528},[403,1395,1396],{"class":495},"      serverFunctionName: ",[403,1398,1360],{"class":413},[403,1400,1401],{"class":405,"line":534},[403,1402,607],{"class":495},[403,1404,1405],{"class":405,"line":548},[403,1406,695],{"class":495},[403,1408,1409],{"class":405,"line":561},[403,1410,893],{"class":495},[341,1412,1413],{},[234,1414,1415,1418,1419,1422],{},[257,1416,1417],{},"firebase.serverFunctionName"," must be a valid JS variable name and cannot include dashes (",[257,1420,1421],{},"-",").",[1424,1425,1426],"style",{},"html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}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 .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 .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":399,"searchDepth":440,"depth":440,"links":1428},[1429,1432],{"id":251,"depth":440,"text":252,"children":1430},[1431],{"id":279,"depth":519,"text":280},{"id":338,"depth":440,"text":339,"children":1433},[1434,1435,1436,1437,1438,1439,1440],{"id":370,"depth":519,"text":371},{"id":729,"depth":519,"text":730},{"id":768,"depth":519,"text":769},{"id":816,"depth":519,"text":817},{"id":967,"depth":519,"text":968},{"id":1291,"depth":519,"text":1292},{"id":1320,"depth":519,"text":1321},"Deploy Nitro apps to Firebase.","md",{},{},{"title":160,"description":1441},"VAjzvn6M5i3g8cSBZeDwkCi9jU8_G12ujz_ck5zquKQ",[1448,1450],{"title":156,"path":157,"stem":158,"description":1449,"children":-1},"Deploy Nitro apps to Edgio.",{"title":164,"path":165,"stem":166,"description":1451,"children":-1},"Deploy Nitro apps to AWS via Flightcontrol.",1775117856706]