Ok, i'm start my project with React, first we require install Node.js and your gmail account for register Firebase, you can register Firebase from here, after completed get back to React. Let's start create React project, if you already have it just skip this step.
Create React Project
I've using MacOS, so open Terminal and type `npm install -g create-react-app` and hit enter then type `create-react-app test-react-firebase` and hit enter, you must waiting for a while until project was created.
We need to working under project, now type `cd test-react-firebase` and hit enter we will move to inside folder test-react-firebase let's check project will work properly by type `yarn start` and hit enter, your default browser should be run localhost and starter page of your project like below image.
From Terminal press `control + c` it's back to prompt for command line again. While develop your project you can test by with localhost but when you need to publish it's not look like this. So type `yarn build` and hit enter, now you've competed build React source project.
Create Firebase Project
Now, you must open this url https://firebase.google.com/ , register with your current gmail and click `GO TO CONSOLE` then click `Add project` the form will appear type project name `testreactfirebase` and click `CREATE PROJECT` like below image.
You must waiting until project was created. Then click `CONTINUE`.
Now, you're on console page goto menu `Hosting` and click `GET STARTED` the key message will guide you how to create firebase host step by step, open new Terminal and type `npm install -g firebase-tools` and hit enter then type `cd test-react-firebase` and hit enter, so we're back to inside react project folder again. Type `firebase login` and hit enter, you need to login with gmail same account as firebase console on browser.
Let's create firebase with command line by type `firebase init` and hit enter, on Terminal will show many options like console page on browser, use `up arrow` and `down arrow` move to menu `Hosting: Configure and deploy Firebase Hosting sites` and choose by hit `spacebar` then hit enter and wait until next prompt appear.
Here from this point use `up arrow` and `down arrow` move to menu `testreactfirebase (project-id)` and choose by hit enter.
The next question will ask you `What do you want to use as your public directory? (public)`, let's type `build` and hit enter then the next question is `Configure as a single-page app (rewrite all urls to /index.html)? (y/N)` just type `N` and hit enter, now the last question is `File build/index.html already exists. Overwrite? (y/N)` just type `N` and hit enter, now Firebase initialization complete!
You already to see sample React project on Firebase Hosting then type `firebase deploy` and hit enter, after it's show Deploy complete! on Terminal, back to firebase console on browser. Click the url under Domain section.
Your browser will open those url of firebase hosting with react project from build sources. Hooray!! you have success using React project with Firebase Hosting.
It's very easy and simple to start both of them. :)








In the wake of perusing this blog, I might want to request more articles over and over. I am feeling myself as fulfill by became more acquainted with these all such data which never went as far as anyone is concerned. Please essayist more. 3CX Hosting
ReplyDeleteGame Dev To Died: Reactjs : How To Deploy With Firebase Hosting >>>>> Download Now
ReplyDelete>>>>> Download Full
Game Dev To Died: Reactjs : How To Deploy With Firebase Hosting >>>>> Download LINK
>>>>> Download Now
Game Dev To Died: Reactjs : How To Deploy With Firebase Hosting >>>>> Download Full
>>>>> Download LINK qG