In Custom Domain Firebase with 2 endpoints how to add different different websites on both end?

25 Views Asked by At

I have taken a domain in that, I have create 2 enpoints in domain webname.com and app.webname.com on Firebase, I want to upload 1 react website on webname.com and another flutter-web on app.webname.com.

But after I add this in both endpoint same website is uploading.

Here my configuration file of firebase for Flutter web:

firebase target:apply hosting app.webname.com projectId

firebase deploy --only hosting:app.webname.com
{
  "hosting": {
    "target": "app.webname.com",

    "public": "build/web",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },
  "functions": [
    {
      "source": "functions",
      "codebase": "default",
      "ignore": [
        "node_modules",
        ".git",
        "firebase-debug.log",
        "firebase-debug.*.log"
      ]
    }
  ]
}

On both endpoints it should be different websites.

0

There are 0 best solutions below