Initializing firebaseApp using firebase-admin sdk

This commit is contained in:
ajmaley 2018-10-30 20:20:05 -04:00
parent 88490b4f2d
commit d975fbfe2a
1 changed files with 8 additions and 8 deletions

View File

@ -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;
const firebaseApp = admin.initializeApp(firebaseConfig);
export default 'firebase-admin';