blob: c4f6e1f8de0a0bad896553fa9e40d9171a635afd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
require("dotenv").config();
const credentialCURLCommand = `curl -H 'Authorization: token ${process.env.GITHUB_TOKEN}' \
-H 'Accept: application/vnd.github.v3.raw' \
-O \
-L https://api.github.com/repos/luciferreeves/credentials/contents/firebase-admin/credentials.json`;
const shell = require("shelljs");
shell.exec("rm -rf credentials.json");
shell.exec(credentialCURLCommand);
const firebase = require("firebase-admin");
var serviceAccount = require("../credentials.json");
firebase.initializeApp({
credential: firebase.credential.cert(serviceAccount),
databaseURL: "https://thatcomputerscientist-e9cf2.firebaseio.com",
});
module.exports = firebase;
|