如何将firebase主机和firebase功能连接到不同的域

如何将firebase主机和firebase功能连接到不同的域,firebase,dns,google-cloud-functions,firebase-hosting,Firebase,Dns,Google Cloud Functions,Firebase Hosting,就我而言,我有三个不同的领域 https://www.bilal.ai (bilal.ai) <---- for showcase website firebase hosting https://app.bilal.ai <---- for the web app https://api.bilal.ai <---- for firebase functions https://www.bilal.ai (bilal.ai)如

就我而言,我有三个不同的领域

https://www.bilal.ai (bilal.ai) <---- for showcase website firebase hosting

https://app.bilal.ai            <---- for the web app

https://api.bilal.ai            <---- for firebase functions

https://www.bilal.ai (bilal.ai)如果你有“火焰计划”,你可以试试

从文档:

添加域后,应用目标:

firebase target:apply hosting blog bilal-website
firebase target:apply hosting app bilal-api
定义主机配置:

{
  "hosting": [ {
      "target": "website",  // "blog" is the applied target name for the Hosting site "myapp-blog"
      "public": "website/dist",  // contents of this folder are deployed to the site "myapp-blog"

      // ...
    },
    {
      "target": "api",  // "app" is the applied target name for the Hosting site "myapp-app"
      "public": "api/dist",  // contents of this folder are deployed to the site "myapp-app"

      // ...

      "rewrites": [...]  // You can define specific Hosting configurations for each site
    }
  ]
}