Deploy React web-app to Google Firebase

Tram Ho

Environment and Usage Version: React 17.0.2; NodeJS 14.17.6 ; Windows 10 x64; npx 6.14.15; npm 6.14.15 .

Go http://localhost:3000 to see the results of the newly created web-app.

Go https://firebase.google.com/ account registration.

Go https://firebase.google.com/docs/cli Download Firebase for Windows, about 130 MB. Install Firebase CLI

Firebase CLI installation requires Firebase account login, success message

The result will be similar to the following

Firebase tool can be installed using command

Run command

to see the version number of the installed Firebase tool

Initialize the firebase project at the folder containing the React web-app just now

Run command

View results: https://keyboardshortcuts2019.web.app/

Admin page: https://console.firebase.google.com/project/keyboardshortcuts2019/overview

A blank web-app appears, because the code has not been committed to the repostiory. Therefore, all you need to do is commit the code to the github repository

In package.json add command

Then continue deploying with the command

or

If you get an error

Treatment https://stackoverflow.com/a/69421211/3728901

Source code: https://github.com/donhuvy/firebasetest

Share the news now