I have used firebase hosting to host my app in the root however I would like to serve a separate codebase for my forum under https://myapp.com/forum/

I created two targets: app for my root app in one repository and forum for my other repository. I also created two sites in Firebase.

My question is: is it even possible to have two separate repos and use firebase deploy to have one project under root and other under /forum/

firebase.json (app):

"rewrites": [
  {
    "source": "!/forum/**",
    "destination": "/appIndex.html"
  }
]

firebase.json (forum):

"rewrites": [
  {
    "source": "/forum/**",
    "destination": "/forumIndex.html"
  }
]

I would like Firebase to show app in the root and forum when I point to mydomain.com/forum/

1 Answers

1
abraham On Best Solutions

You can maintain your code in two different repos but once you want to deploy to firebase you'll have to build both and deploy both from the same directory.