-
Sækja repo:
git clone https://github.com/dingolfsson/tikket.git -
cd tikket -
Uppsetning:
npm i -
Stofna Firebase Project: https://firebase.google.com/
- Authentication: Sign-in method
Email/Password - Database: Cloud Firestore
- Authentication: Sign-in method
-
Firestore stillingar
service cloud.firestore { match /databases/{database}/documents { match /projects/{project} { allow read: if request.auth.uid != null allow write: if request.auth.uid != null } match /tickets/{ticket} { allow read: if request.auth.uid != null allow write: if request.auth.uid != null allow update: if request.auth.uid != null } match /users/{userId}{ allow create: if request.auth.uid != null; allow read: if request.auth.uid != null allow write: if request.auth.uid == userId } match /notifications/{notification} { allow read: if request.auth.uid != null } } }
-
.env uppsetning
REACT_APP_API_KEY = apiKey REACT_APP_DOMAIN = authDomain REACT_APP_DATABASE = databaseURL REACT_APP_PROJECT = projectId REACT_APP_STORAGE = storageBucket REACT_APP_MESSAGE = messagingSenderId
Eftir að hafa sótt vefinn þarf að stofna aðgang hjá Firebase. Virkja þarf Email/Password auðkenning og stofna Firestore gagnagrunn.
Firestore stillingarnar fyrir Firebase og Firestore eru fyrir ofan, einnig hvernig .env skal vera uppsett.



