Skip to content

Commit

Permalink
Refactor gitignore: Remove public/script/fireconfig.js
Browse files Browse the repository at this point in the history
  • Loading branch information
evanalif113 committed Oct 31, 2024
1 parent 1206217 commit 31ebffc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ firebase-debug.log
node_modules/
package-lock.json
package.json
public/script/fireconfig.js
Dashboard-Pusdatin-Klimatologi.code-workspace
24 changes: 24 additions & 0 deletions public/script/fireconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// fireconfig.js
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-app.js";
import { getAnalytics } from "https://www.gstatic.com/firebasejs/10.14.1/firebase-analytics.js";

// Konfigurasi Firebase
// firebaseConfig.js
export const firebaseConfig = {
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
databaseURL: process.env.FIREBASE_DATABASE_URL,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.FIREBASE_APP_ID,
measurementId: process.env.FIREBASE_MEASUREMENT_ID,
};


// Inisialisasi Firebase App
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

export {analytics};
export default app; // Menggunakan default export untuk app

0 comments on commit 31ebffc

Please sign in to comment.