Skip to content

sean1093/react-firebase-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-firebase-starter

An example to deploy a react webapp on firebase hosting.

Step by step

How to create a Firebase project

Go to Firebase console. Select the Add Project. And follow the step by step to configure your firebase project.

Create your webapp

npx create-react-app app

Setup the Firebase environment

npm install -g firebase-tools

Add Firebase into your project

Login Firebase with your Google account first

firebase login

To connect your local project to your Firebase project, run the following command from the root of your local project directory

firebase init

Deploy your webapp

In app directory, build your react webapp

yarn build

To deploy to your site, run the following command from the root of your local project directory

firebase deploy

Reference