4
votes

So I have built a simple firebase and javascript app that uses firebase database and hosting. I have successfully built the app and deployed to Firebase hosting, however when the cmd provides the url that leads to the app it takes me to some completely random firebase landing page.

All deployment is correct and I know all my code is correct, but it keeps sending me to the random landing page: https://firebase.google.com/docs/hosting/

2
What are you expecting it to do differently? - Doug Stevenson

2 Answers

2
votes

When you first create a project on firebase it asks you for the public directory: What do you want to use as your public directory? public Usually the default its public, so the firebase generates a random welcome index.html there.

When you setup the firebase init configure the public directory to your files and you should see your app instead of the welcome index file, or simply put all your files inside the public directory you've chosen above.

Here I found a very simple tutorial on how to get started on that: https://www.brooks-patton.com/deploying-a-static-website-to-firebase/

1
votes

Another way - you can just edit firebase.json file, in the line with "public" change the path where is your code was built.

enter image description here