Hosting
npx create-react-app myapp
Create New Project in firebase
Add Project -> input name Project -> Continue

back your Visual Studio Code
install firebase tools cli
npm install -g firebase-tools
in terminal input firebase login

if you haven't login , login with your google account in web
input firebase init
follow the steps


if you have to create the project in firebase (STEP 1)

follow the step click enter
open firebase.json
change the code

to
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"*/.",
"/node_modules/"
],
"rewrites": [ {
"source": "**",
"destination": "/index.html"
}, {
"source": "/foo{,/**}",
"destination": "/index.html"
}, {
"source": "!/@(js|css)/**",
"destination": "/index.html"
} ]
}
}
next input firebase init in terminal

input "build" in your terminal , next step click enter until finished
if finished "npm run build" in your terminal
finally "firebase deploy" input your terminal

Last updated
Was this helpful?