Deploy your react-based website in Firebase
May 9, 2021
Have you developed a website using React JS? Are you now looking for hosting your site online? Then just follow the following simple steps:
- Click “Run” in your Windows menu-bar, type “cmd” in the Open box and click OK.
- Once the command line opened, go to your root folder of your website. e.g.
cd ../../website/client
3. Install firebase tools globally in the command line at root.
npm install -g firebase-tools
4. Install Firebase:
npm install firebase
5. Log in your Firebase account:
firebase login
6. Initiate Firebase in your project:
firebase init
7. Customize your project information accordingly.
8. Start building your website in Firebase:
npm run build
9. Finally deploy your site in Firebase:
firebase deploy
Voilà!….you have hosted your site and can visit through the link generated by Firebase.