Prerequisites :
- Create ReactJs project
- Create Project on firebase Console
link:-https://firebase.google.com/?gclid=Cj0KCQjwhY-aBhCUARIsALNIC07zQYu0Zp_FW19g8IbfwiCA1YIshJ03ipPAtpuPnJGndIt4JfkbSwcaAuFbEALw_wcB&gclsrc=aw.d
Steps for firebase Console:
- Select hosting after creating the project and click on “Get Started”
- Now follow the step as mentioned
Steps for React App :
- Add firebase tools :-
npm install -g firebase-tool
- Login to firebase from terminal :
cmd:-firebase login
- Type yes as shown in image and it will navigate to browser for login
- Select your email and click “Allow”
- You will get successful login message on browser as well as your terminal
- Initialize firebase from terminal:
cmd:firebase init
- After init it will prompt some questing answer them according to the image below
- Now we need to create build
npm run build
- Finally deploy your project
firebase deploy
- After this you will get your hosting URL
OUTPUT:
You can verify if the app is successfully deployed or not by the hosting URL we get