Skip to content

Commit

Permalink
added firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
LianhaoZ committed Nov 7, 2024
1 parent 95cd853 commit fea9024
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npm instal
- run: npm install
- run: npm run build --if-present
- run: npm test
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ stats.html

.firebase

src/firebase/firebase.js
# src/firebase/firebase.js

node_modules/
package-lock.json
package-lock.json

.env
34 changes: 34 additions & 0 deletions src/firebase/firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional

const firebaseConfig = {
apiKey: "AIzaSyCSfeLVEVhs6j0uNsi9fIxxayZMPbEup1g",
authDomain: "ohours.firebaseapp.com",
databaseURL: "https://ohours-default-rtdb.firebaseio.com",
projectId: "ohours",
storageBucket: "ohours.firebasestorage.app",
messagingSenderId: "558747405743",
appId: "1:558747405743:web:de6600f44afdbe4c9a335a",
measurementId: "G-XXWW390RPS"
};

// const firebaseConfig = {
// apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
// authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
// databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL,
// projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
// storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
// messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID,
// appId: process.env.REACT_APP_FIREBASE_APP_ID,
// measurementId: process.env.REACT_APP_FIREBASE_MEASUREMENT_ID,
// };

// Initialize Firebase
export const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

0 comments on commit fea9024

Please sign in to comment.