-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase.js
32 lines (29 loc) · 1.08 KB
/
firebase.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
const firebase = require("firebase");
var config = {
apiKey: "AIzaSyDpBdCGR-LPoQgEnMcObbUn5k4WU6pOV-A",
authDomain: "data-scraping-cd97c.firebaseapp.com",
databaseURL: "https://data-scraping-cd97c.firebaseio.com",
projectId: "data-scraping-cd97c",
storageBucket: "",
messagingSenderId: "494564601702"
};
firebase.initializeApp(config);
const fbUsers = firebase.database().ref("/users/");
const fbEmails = (userId, userIdTimestamp) =>
firebase.database().ref(`/users/${userId}/${userIdTimestamp}/emails`);
const fbLinkedinUsers = (userId, userIdTimestamp) =>
firebase.database().ref(`/users//${userId}/${userIdTimestamp}/linkedinusers`);
const fbYelp = (userId, userIdTimestamp) =>
firebase.database().ref(`/users/${userId}/${userIdTimestamp}/yelp`);
const fbPlaces = (userId, userIdTimestamp) =>
firebase.database().ref(`/users/${userId}/${userIdTimestamp}/places`);
const fbZip = (userId, userIdTimestamp) =>
firebase.database().ref(`/users/${userId}/${userIdTimestamp}/ziplocations`);
module.exports = {
fbEmails,
fbLinkedinUsers,
fbYelp,
fbPlaces,
fbZip,
fbUsers
};