3

In Firebase everything is divided into projects. I am making games so logically each game should be one project.

Now I would like to host a static page for each games. I think it is a good idea to use the Hosting menu in each projects but however the website should be under the same game developer company website.

In the connecting domain section I only see the option to connect the hosted site to either root domain or subdomain. Connecting to root is no good since this is not the only game I have and I already have a landing page of my company, so the option for me is to use the subdomain as mygame.companyname.com

But I am moving to Firebase from somewhere else (AWS S3 static web hosting) and I have been using companyname.com/mygame for long time. Is there a way to make the hosted site appears as a subfolder like that instead of a subdomain? Currently in AWS, when I update the game site I can use AWS command line to sync to just the game subfolder. In Firebase's command line, using deploy means uploading everything to the root.

I might need an another Firebase project just for hosting the companyname.com so that all my games can connect to it. But that's ok.

5argon
  • 3,683
  • 3
  • 31
  • 57
  • Each subdomain on Firebase Hosting will require a separate Firebase project. See https://stackoverflow.com/questions/30147602/how-do-i-make-a-custom-subdomain-on-firebase. Aside from that, you should simply create the folder structure you need on your local disk and then publish that using `firebase deploy`. So if you need a `mygame` subdirectory for `mygame`, create said directory under the root and deploy. – Frank van Puffelen Jun 26 '17 at 14:35
  • Note that I prefer not to use subdomain because I have already marketed the folder structure style domain in many places and want to keep using it. The problem is if I create the folder structure, that folder would have to start at my main company's website for the Game A to be a subfolder of that. If I do this, I won't be able to use Game B Hosting section since Game B would already have been included in Game A's `deploy` command. And moreover doesn't updating company website via Game A project page seems odd? – 5argon Jun 26 '17 at 15:18
  • The common approach to different hosting locations is to use different subdomains, i.e. gamea.companyname.com. In solutions I know of, a single (sub)domain is mapped to a single hosting provider. You can often within that provider point to a different location on disk (e.g. with server-side rewrites), but having subdirectories map to different providers would be new to me. – Frank van Puffelen Jun 26 '17 at 15:39

0 Answers0