Skip to content

Commit

Permalink
fix error 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Aweiro committed Nov 2, 2024
1 parent a829bbe commit 49b0694
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
.env
keys/serviceAccountKey.json
9 changes: 9 additions & 0 deletions js/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.1/firebase
import { getStorage } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-storage.js";
import { getFirestore, addDoc, collection } from "https://www.gstatic.com/firebasejs/9.6.1/firebase-firestore.js";

require('dotenv').config(); // Завантажте змінні середовища з файлу .env

var admin = require("firebase-admin");
var serviceAccount = JSON.parse(process.env.FIREBASE_ADMIN_SDK); // Отримайте секрет

admin.initializeApp({
credential: admin.credential.cert(serviceAccount)
});

// Ваші конфігурації Firebase
const firebaseConfig = {
apiKey: "AIzaSyD_xNZ2VHqkyorptZudnB0bGIO5Qj3YECk",
Expand Down

0 comments on commit 49b0694

Please sign in to comment.