From d975fbfe2af61e818a98902f071d8f44326feabc Mon Sep 17 00:00:00 2001 From: ajmaley Date: Tue, 30 Oct 2018 20:20:05 -0400 Subject: [PATCH] Initializing firebaseApp using firebase-admin sdk --- src/firebase.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/firebase.js b/src/firebase.js index 9649117..2dee48a 100644 --- a/src/firebase.js +++ b/src/firebase.js @@ -1,13 +1,13 @@ -import firebase from 'firebase/app'; -import 'firebase/database'; -import 'firebase/storage'; import * as admin from 'firebase-admin'; var serviceAccount = require('./keys/marten-application-firebase-adminsdk-zvjmp-c177ac648f.json'); -const firebaseApp = admin.initializeApp({ - credential: admin.credential.cert(serviceAccount), - databaseURL: 'https://marten-application.firebaseio.com' - }); +const firebaseConfig = { + credential: admin.credential.cert(serviceAccount), + databaseURL: "https://marten-application.firebaseio.com", + storageBucket: "marten-application.appspot.com" +}; -export default firebase; \ No newline at end of file +const firebaseApp = admin.initializeApp(firebaseConfig); + +export default 'firebase-admin'; \ No newline at end of file