How to host your ReactJs project on firebase.

Before explaining the process I am assuming that you have a firebase account set up. If not please set up an account and install the Firebase CLI.

  1. Go into the project directory and run these commands in the given order.

2. After running the above command choose the Firebase Hosting option. (Not the GitHub one)

3. So if you have created a project on the Firebase then choose the existing project else go with the appropriate one.

4. Select the Project name if you have one in the Firebase.

Now the most important step where most developers mess up.

  • you have to write build as your public directory.
  • Then you have to say yes cause you are using react which is SAP.
  • npm run build (this will bundle up all the static data inside the build folder)
  • firebase deploy ( A single command :) to deploy your application)

--

--

Web Developer + Android Developer + Traveller along with all this i love to tinker with new technology.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jack Sparrow

Web Developer + Android Developer + Traveller along with all this i love to tinker with new technology.