[[oktatas:web|< Web]] ====== Firebase ====== * **Szerző:** Sallai András * Copyright (c) 2022, Sallai András * Szerkesztve: 2022 * Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC Attribution-Share Alike 4.0 International]] * Web: https://szit.hu ===== Regisztráció ===== * https://firebase.google.com/ (2022) ===== Telepítés ===== npm install -g firebase-tools Ellenőrzés: firebase --version ===== Projekt készítése ===== Lépjünk be a projekt könyvtárába: Bejelentkezünk: firebase login A projekt felkészítése: firebase init Lehetséges kimenet: firebase init ######## #### ######## ######## ######## ### ###### ######## ## ## ## ## ## ## ## ## ## ## ## ###### ## ######## ###### ######## ######### ###### ###### ## ## ## ## ## ## ## ## ## ## ## ## #### ## ## ######## ######## ## ## ###### ######## You're about to initialize a Firebase project in this directory: /home/andras/dev/gyak/firebase/app02 ? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. (Press to select, to toggle all, to invert selection, and to proceed) (optionally) provision default instance ◯ Firestore: Configure security rules and indexes files for Firestore ◯ Functions: Configure a Cloud Functions directory and its files ❯◉ Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys ◯ Hosting: Set up GitHub Action deploys ◯ Storage: Configure a security rules file for Cloud Storage (Move up and down to reveal more choices) A "space" billentyűvel választhatunk ki. Szerkesszük a firebase.json fájlt. Adjuk meg melyik könyvtárból kell feltölteni. Legyen például a public könyvtár: { "database": { "rules": "database.rules.json" }, "hosting": { "public": "public" } } Feltöltés: firebase deploy