From f6269662238b9f5d7b50492eda58f5fe5e8eed82 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Thu, 23 Jan 2020 10:29:14 -0800 Subject: [PATCH] Changed firebase to use ENV variable for staging. --- README.MD | 3 +++ client/src/firebase/firebase.utils.js | 16 +++------------- hasura/config.yaml | 1 + 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.MD b/README.MD index 832eb149d..560bb2d4b 100644 --- a/README.MD +++ b/README.MD @@ -7,3 +7,6 @@ ALL CHANGES MUST BE MADE USING LOCAL CONSOLE TO ENSURE DATABASE MIGRATION FILES To Start Hasura CLI: npx hasura console --admin-secret Dev-BodyShopAppBySnaptSoftware! + +Migrating to Staging: +npx hasura migrate apply --endpoint https://bodyshop-staging-db.herokuapp.com/ --admin-secret Staging-BodyShopAppBySnaptSoftware! \ No newline at end of file diff --git a/client/src/firebase/firebase.utils.js b/client/src/firebase/firebase.utils.js index a15d39c7d..4a2a8fae7 100644 --- a/client/src/firebase/firebase.utils.js +++ b/client/src/firebase/firebase.utils.js @@ -1,23 +1,13 @@ import firebase from "firebase/app"; import "firebase/firestore"; import "firebase/auth"; -import "firebase/database" - -const config = { - apiKey: "AIzaSyDV9MsSHZmpLtjoaTK_ObvjFaJ-nMSd2KA", - authDomain: "bodyshop-dev-b1cb6.firebaseapp.com", - databaseURL: "https://bodyshop-dev-b1cb6.firebaseio.com", - projectId: "bodyshop-dev-b1cb6", - storageBucket: "bodyshop-dev-b1cb6.appspot.com", - messagingSenderId: "922785209028", - appId: "1:922785209028:web:96e9df15401eee5d784791", - measurementId: "G-2D5378VCHE" -}; +import "firebase/database"; +const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG); firebase.initializeApp(config); export const createUserProfileDocument = async (userAuth, additionalData) => { - //Needs to be redone to write to GQL database. + //Needs to be redone to write to GQL database. console.log("userAuth from firebase Utils", userAuth); if (!userAuth) return; diff --git a/hasura/config.yaml b/hasura/config.yaml index d6da9ae7f..da0fc5e72 100644 --- a/hasura/config.yaml +++ b/hasura/config.yaml @@ -1 +1,2 @@ endpoint: https://bodyshop-dev-db.herokuapp.com +#endpoint: https://bodyshop-staging-db.herokuapp.com/ \ No newline at end of file