forked from ericzhang98/studyspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.js
23 lines (20 loc) · 986 Bytes
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var ConstantManager = function() {
// - Firebase admin setup
var firebaseAdmin = require("firebase-admin");
var serviceAccount = require("./dontlookhere/porn/topsecret.json"); //shhhh
var firebase = firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert(serviceAccount),
databaseURL: "https://studyspace-490cd.firebaseio.com/"
});
var firebaseRoot = firebase.database().ref();
// - Firebase Databases
this.classRoomsDatabase = firebaseRoot.child("ClassRooms");
this.roomInfoDatabase = firebaseRoot.child("RoomInfo");
this.roomMessagesDatabase = firebaseRoot.child("RoomMessages");
this.roomPinnedMessagesDatabase = firebaseRoot.child("RoomPinnedMessages");
this.userActivityDatabase = firebaseRoot.child("UserActivity");
this.classDLDatabase = firebaseRoot.child("ClassDownLists");
this.roomTypingDatabase = firebaseRoot.child("RoomTyping");
this.notificationsDatabase = firebaseRoot.child("Notifications");
}
module.exports = ConstantManager;