【问题标题】:Multiple Angular Project hosting on a single Firebase project在单个 Firebase 项目上托管多个 Angular 项目
【发布时间】:2020-02-19 17:20:46
【问题描述】:

我正在考虑在一个 Firebase 项目下托管一个包含多个 Angular 项目的投资组合网站(例如 https://aaaaa.firebaseapp.com/)。所以说我有 3 个角度应用程序(abc、def 和 ghi)。我将在单个投资组合登录页面上显示它们并在 firebase 上托管。 例如https://aaaaa.firebaseapp.com/abc https://aaaaa.firebaseapp.com/def https://aaaaa.firebaseapp.com/ghi 如何做到这一点,甚至有可能吗?请提出建议。

【问题讨论】:

    标签: angular firebase-hosting portfolio


    【解决方案1】:

    Firebase 托管支持每个项目拥有多个网站。然后,您可以将每个站点配置为在路径下提供服务。

    {
      "hosting": [ {
          "target": "blog",  // "blog" is the applied target name for the Hosting site "myapp-blog"
          "public": "blog/dist",  // contents of this folder are deployed to the site "myapp-blog"
    
          // ...
        },
        {
          "target": "app",  // "app" is the applied target name for the Hosting site "myapp-app"
          "public": "app/dist",  // contents of this folder are deployed to the site "myapp-app"
    
          // ...
    
          "rewrites": [...]  // You can define specific Hosting configurations for each site
        }
      ]
    }
    

    https://firebase.google.com/docs/hosting/multisites#define_hosting_config

    【讨论】:

      猜你喜欢
      • 2018-09-17
      • 1970-01-01
      • 2019-12-28
      • 2018-06-05
      • 1970-01-01
      • 2012-03-22
      • 2013-03-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多