Changed firebase to use ENV variable for staging.

This commit is contained in:
Patrick Fic
2020-01-23 10:29:14 -08:00
parent ed937a57a0
commit f626966223
3 changed files with 7 additions and 13 deletions

View File

@@ -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!

View File

@@ -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;

View File

@@ -1 +1,2 @@
endpoint: https://bodyshop-dev-db.herokuapp.com
#endpoint: https://bodyshop-staging-db.herokuapp.com/