react-app-starter project demonstrates web application development using react components.
Demo Online
git clone https://github.com/ligangwang/react-app-starter my_app
cd my_app
npm install
- 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
npm start
open http://localhost:3000 to see the app running
Build a production deployment. It publishes to the folder named "build"
npm run build
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