mirror of
https://github.com/DerTyp7/apartment-altenau-nextjs.git
synced 2025-10-29 04:42:11 +01:00
put firebase api in .env (old values are outdated)
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,6 +19,7 @@
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
@@ -27,6 +28,7 @@ yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
.env
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
10
README.md
10
README.md
@@ -6,3 +6,13 @@ This app functions as a flyer for the apartment in Altenau. It has no booking fu
|
||||
|
||||
We use Firebase for the backend. The app is configured to use the Firebase project `altenau-apartment`.
|
||||
Texts based on languages are stored in the `localeTexts` collection. Since NextJS caches the HTML file its not bad to always fetch the texts from the database.
|
||||
|
||||
## .env file
|
||||
|
||||
FIREBASE_API_KEY=""
|
||||
FIREBASE_AUTH_DOMAIN=""
|
||||
FIREBASE_PROJECT_ID=""
|
||||
FIREBASE_STORAGE_BUCKET=""
|
||||
FIREBASE_MESSAGING_SENDER_ID=""
|
||||
FIREBASE_APP_ID=""
|
||||
FIREBASE_MEASUREMENT_ID=""
|
||||
|
||||
@@ -2,15 +2,25 @@ import { getFirestore } from "@firebase/firestore";
|
||||
import { initializeApp } from "firebase/app";
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyBpj2FZEONb_Qpca4-brCzB0OVJPf3l8hk",
|
||||
authDomain: "apartment-f960a.firebaseapp.com",
|
||||
projectId: "apartment-f960a",
|
||||
storageBucket: "apartment-f960a.appspot.com",
|
||||
messagingSenderId: "1007134515151",
|
||||
appId: "1:1007134515151:web:9ff0216c618b55a571bcba",
|
||||
measurementId: "G-RMSZVM1BCG",
|
||||
apiKey: process.env.FIREBASE_API_KEY,
|
||||
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
|
||||
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,
|
||||
};
|
||||
|
||||
console.log({
|
||||
apiKey: process.env.FIREBASE_API_KEY,
|
||||
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
|
||||
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,
|
||||
});
|
||||
|
||||
const app = initializeApp(firebaseConfig);
|
||||
|
||||
export const db = getFirestore();
|
||||
|
||||
Reference in New Issue
Block a user