Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Tek depolu sistemlerle birden fazla projeyi tek bir dizinde düzenleyip yönetebilirsiniz. Bu kılavuzda, App Hosting ile Nx tabanlı uygulamaları dağıtmaya nasıl başlayacağınız açıklanmaktadır.
Firebase konsoluyla monorepo'ları dağıtma
Monorepo desteği, Firebase konsolundaki grafik arka uç kurulum akışına yerleştirilmiştir. "Dağıtım ayarları" bölümünde "Kök dizin" istenirse
monorepo içinde dağıtmak istediğiniz uygulamanın yolunu belirtin:
Firebase CLI ile monorepo'ları dağıtma
Monorepo desteği, Firebase CLI komutu apphosting:backends:create ile çağrılan arka uç kurulum akışına yerleştirilmiştir. Bu akışa girip seçtiğiniz GitHub deposunu belirttikten sonra, uygulamanızın kök dizinini deponuza göre belirtmeniz istenir. Bu istemde, monorepo içinde dağıtmak istediğiniz uygulamanın yolunu iletin:
$ firebaseapphosting:backends:create--project[project-name]i === Import a GitHub repository✔ Connected with GitHub successfully? Which GitHub repo do you want to deploy? gh-username/nx-monorepo? Specify your app's root directory relative to your repository path/to/app
Örneğin, aşağıdaki Nx proje yapısı ve oluşturup dağıtmak istediğiniz uygulama olarak "target-app" göz önüne alındığında dağıtılacak öğeler şunlardır:
Uygulamanın deponuza göre kök dizini apps/target-app.
Tek depolu dağıtımla ilgili sorunları giderme
"Kök dizin" alanını belirtmezseniz derleme başarısız olur ve App Hosting Nx monoreposunda hedeflenecek bir proje bulunamadığını belirten bir mesaj gösterilir.
Nx + Angular uygulamaları için uygulamayı oluşturmak üzere Angular uygulama oluşturucuyu kullanmanız gerekir. Angular uygulama oluşturucu, project.json içinde belirtilir.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-06 UTC."],[],[],null,["\u003cbr /\u003e\n\nWith monorepos, you can organize and manage multiple projects in a single\ndirectory. This guide describes how to get started deploying Nx-based apps with\nApp Hosting.\n\nDeploy monorepos with the Firebase console\n\nMonorepo support is built into the graphical backend setup flow in the Firebase\nconsole. When prompted for a \"Root directory\" under \"Deployment settings,\"\nspecify the path to the application you want to deploy inside the monorepo:\n\nDeploy monorepos with the Firebase CLI\n\nMonorepo support is built into the backend setup flow invoked by the Firebase\nCLI command `apphosting:backends:create`. After you enter this flow and specify\nyour chosen GitHub repository, you are prompted to specify your app's root\ndirectory relative to your repository; at this prompt, pass the path to the\napplication you want to deploy inside the monorepo: \n\n $ firebase apphosting:backends:create --project [project-name]\n i === Import a GitHub repository\n ✔ Connected with GitHub successfully\n\n ? Which GitHub repo do you want to deploy? gh-username/nx-monorepo\n ? Specify your app's root directory relative to your repository path/to/app\n\nFor example, here are the assets that would be deployed given the following Nx\nproject structure and \"target-app\" as the application you want to build and\ndeploy: \n\n .\n ├── lib\n ├── apps\n │ └── target-app\n │ ├── project.json\n │ └── src\n │ └── ...\n ├── nx.json\n ├── package-lock.json\n └── package.json\n\nThe app's root directory relative to your repository is `apps/target-app`.\n\nTroubleshooting monorepo deployment\n\n- If you do not specify the \"root directory\" field, then the build will fail and display a message that App Hosting cannot find a project to target inside the Nx monorepo.\n- For Nx + Angular applications, you must use the [Angular application\n builder](https://angular.io/guide/esbuild) to build the application. The Angular application builder is specified in `project.json`"]]