Skip to content

a starter template of web application development using react components plus firebase services

Notifications You must be signed in to change notification settings

ligangwang/react-app-starter

Repository files navigation

react-app-starter project demonstrates web application development using react components.
Demo Online

Clone project and install packages

git clone https://github.com/ligangwang/react-app-starter my_app
cd my_app
npm install

Firebase Authentication Step

  • Sign in firebase console
  • Add a project to the console
  • Click "Add Firebase to your web app"
  • Copy contents of config into a json format saved as "firebase-config.json" under "src/Service/firebase" folder. It looks like the following:
{
  "apiKey": "your_project_api_key",
  "authDomain": "your_project_id.firebaseapp.com",
  "databaseURL": "https://your_project_id.firebaseio.com",
  "projectId": "your_project_id",
  "storageBucket": "your_project_id.appspot.com",
  "messagingSenderId": "message_sender_id"
}
  • Go to Authentication->SIGN-IN-METHOD, enable Google PROVIDER_ID

Run development server locally

npm start
open http://localhost:3000 to see the app running

Deploy a production build

Build a production deployment. It publishes to the folder named "build"

npm run build

Publish to Firebase Hosting

Install firebase command line if it is first time and execute login and init commands. Make sure to type "build" as public folder to setup folder in init command.

npm install -g firebase-tools
firebase login
firebase init

Publish to Firebase Hosting

firebase deploy

Features