2.3.4: Firebase Hosting
- 1.Firebase Hosting allows us to deploy web applications easily and efficiently with configuration to support React Router's
- 2.How to deploy our apps to Firebase Hosting
Firebase Hosting is a simple web-hosting tool that supports custom configuration. Source: Firebase
Firebase Hosting is a simple and robust web-hosting tool that allows us to deploy our static apps (like React apps) with custom configuration to support features such as React Router's
BrowserRouter. It otherwise performs generally the same functionality as GitHub Pages that we used previously.
- 1.We may want to read this in tandem with Create React App's deploy instructions for Firebase.
- 1.We can skip the warning about
service-worker.jsbecause we do not use that file in our repos at Rocket. Rocket deleted this file from Create React App starter code because service workers are for progressive web apps ("PWAs", web apps that run like native mobile apps on mobile devices) and we are not building PWAs.
We will need this step to deploy our React apps with React Router
- 1.Create React App's deploy instructions for Firebase should take care of this for us automatically if we reply "Yes" to the option to "Configure as a single-page app (rewrite all urls to /index.html)?".
If you are unable to access the Firebase Realtime Database or Firebase Storage following deployment online, please checkout the document above. You may need to update your security rules for each Firebase application that is associated to the application. You can find this in the Rules section of each app.