Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.52 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.52 KB

Web App

This directory contains the React web app for viewing the submitted benchmark results.

Update Firebase configuration

You need to use your own Firebase project to run this web app.

  1. First create a firebase.env

    touch firebase.env
  2. Then copy and paste this to the firebase.env file you just created. Remember to update the dummy values with your Firebase project settings.

    export REACT_APP_FIREBASE_WEB_API_KEY=abc
    export REACT_APP_FIREBASE_WEB_AUTH_DOMAIN=abc
    export REACT_APP_FIREBASE_WEB_APP_ID=abc
    export REACT_APP_FIREBASE_WEB_MEASUREMENT_ID=abc
    
    export REACT_APP_FIREBASE_PROJECT_ID=abc
    export REACT_APP_FIREBASE_MESSAGING_SENDER_ID=abc
    export REACT_APP_FIREBASE_DATABASE_URL=abc
    export REACT_APP_FIREBASE_STORAGE_BUCKET=abc
  3. Import the env vars into your shell

    source firebase.env

Run and deploy the app to Firebase Hosting

To deploy the app using Firebase Hosting please visit Get started with Firebase Hosting for more information.

You will need Firebase CLI for the following commands.

To run the web app locally:

yarn build
firebase serve --only hosting --project <FIREBASE_PROJECT_ID>

To deploy the web app to Firebase Hosting

firebase deploy --only hosting --project <FIREBASE_PROJECT_ID>

To enable CORS: https://firebase.google.com/docs/storage/web/download-files