-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.js
33 lines (25 loc) · 1002 Bytes
/
utils.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const secret = "ecrancreatedbyelvisduru";
const firebaseConfig = {
apiKey: "AIzaSyD7MjB3q0_LJaMZiN-bB3mL56mOHC-bFMM",
authDomain: "ecran-fe278.firebaseapp.com",
databaseURL: "https://ecran-fe278.firebaseio.com",
projectId: "ecran-fe278",
storageBucket: "ecran-fe278.appspot.com",
messagingSenderId: "68777747614",
appId: "1:68777747614:web:2933f62bbf054fdf15478f",
measurementId: "G-4KRRCQR6ZX",
};
const firebase = require("firebase/app");
require("firebase/storage");
firebase.initializeApp(firebaseConfig);
const storageRef = firebase.storage().ref();
const admin = require("firebase-admin");
var serviceAccount = require("./serviceAccountKey.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
storageBucket: "ecran-fe278.appspot.com",
});
const bucket = admin.storage().bucket();
const Emitter = require("events").EventEmitter;
const em = new Emitter();
module.exports = { secret, storageRef, bucket, em };