Skip to content

Commit

Permalink
add docs on Firebase; ref #133
Browse files Browse the repository at this point in the history
  • Loading branch information
radekstepan committed Jul 4, 2019
1 parent b539c4d commit 32c6a5a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ $ make start-dev

### GitHub Pages

#### 1. GitHub

To serve the app from GitHub Pages set the "Source branch" in the `/settings` page of your repository.

#### 2. Firebase

Then, signup for Firebase and go to your [console](http://console.firebase.google.com) and create a new project there.

You can leave the Database/Storage section as is, you only want to configure your "Authentication". There, enable "GitHub" and add your domain in "Authorised domains". Mine is set to `radekstepan.com` and `type: Custom`. If you want to run the app locally, you may want to add `localhost` and/or `0.0.0.0` as well.

Since you are using your own Firebase project, you want to copy a couple of keys/ids into the `firebase.*` section of `src/config.js`.

- `firebase.apiKey` is "Web API key" from the "Settings" page (in "Project Overview")
- `firebase.authDomain` is one of the authorised domains in "Authentication", then "Sign-in method"

#### Sync with `master` branch

To serve the app from GitHub Pages that are in sync with master branch, add these two lines to `.git/config`, in the `[remote "origin"]` section:

```
Expand Down
5 changes: 1 addition & 4 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ export default {
// Firebase.
"firebase": {
apiKey: "AIzaSyD_kfzkAPA87PoRFIZa8JEzZkT66CqUDpU",
authDomain: "burnchart.firebaseapp.com",
databaseURL: "https://burnchart.firebaseio.com",
storageBucket: "firebase-burnchart.appspot.com",
messagingSenderId: "185222099419"
authDomain: "burnchart.firebaseapp.com"
},
// Data source provider.
"provider": "github",
Expand Down

0 comments on commit 32c6a5a

Please sign in to comment.