Skip to content

jeescu/react-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React + Firebase Setup

This project was bootstrapped with Create React App.

Includes:

  • Firebase setup
  • Authentication
  • Database: Retrieve and push data
  • Cloud Storage: Upload file and save to database

Getting Started

  • Create your Firebase Project in http://console.firebase.google.com.
  • Copy config in dashboard's Web Setup and paste to firebase.js.
  • Clone project and install dependencies.
> git clone 
> cd react-firebase
> npm install

Deployment process with firebase

  1. Install Firebase Tools globally. (You may need sudo here)
> npm install -g firebase-tools
  1. Login to firebase using this tool in CLI
> firebase login
  1. CD to your working project and initialize firebase.
> cd react-firebase
> firebase init
  1. Configure firebase:
  • Allow CLI features for Database, Functions, Hosting.
  • Select your Firebase project to be used.
  • Accept default rules to write on default file database.rules.json
  • Install dependencies.
  • Choose a build name directory since we build our app.
  • Select Yes for configuring single app page. This is suitable also when app is using react-router.
  • Firebase initialization complete!
  1. Then we will build our app.
> npm build
  1. Deploy!
> firebase deploy

Access your running application to the given Hosting URL.

Important

  • Make sure to rebuild your app if you made changes and want to deploy again.

About

🔥 Sample React + Firebase setup

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published