Last active
October 4, 2023 04:39
-
-
Save thiagosouza/daa9c2e792826e827b66428fd4049df1 to your computer and use it in GitHub Desktop.
Firebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| firebase init hosting | |
| firebase target:apply hosting www www | |
| firebase target:apply hosting app app | |
| firebase target:apply hosting backoffice backoffice | |
| firebase target:apply hosting blog blog | |
| mkdir public && cd public | |
| mkdir www app backoffice blog | |
| cp index www | |
| cp index app | |
| cp index backoffice | |
| cp index blog | |
| firebase deploy --only hosting:www | |
| firebase deploy --only hosting:app | |
| firebase deploy --only hosting:backoffice | |
| firebase deploy --only hosting:blog | |
| firebase emulators:start --only hosting | |
| #firebase deploy --only hosting:TARGET_NAME | |
| firebase deploy --only hosting:www | |
| firebase deploy --only hosting:app | |
| firebase deploy --only hosting:backoffice | |
| firebase deploy --only hosting:blog | |
| firebase hosting:channel:deploy | |
| firebase deploy --only hosting:app-project-id | |
| #https://console.firebase.google.com/project/__/hosting/main# | |
| #click on "add another site" | |
| #write app-project-id | |
| #firebase.json | |
| { | |
| "site": "app-project-id", | |
| "public": "public/app", | |
| "rewrites": [{ | |
| "source": "**", | |
| "destination": "/index.html" | |
| }] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #node.js setup | |
| nvm install 12 && nvm current | |
| #firebase tools | |
| npm i -g firebase-tools && firebase --version | |
| #firebase login and project init | |
| firebase login | |
| firebase init | |
| #firebase remoteconfig:versions:list | |
| export VERSION=11 && firebase remoteconfig:get -v $VERSION -o remoteconfig.template.json | |
| #firebase emulators | |
| export FIRESTORE_EMULATOR_HOST=localhost:8080 && echo $FIRESTORE_EMULATOR_HOST | |
| firebase emulators:start --only firestore --export-on-exit=./data --import=./data | |
| firebase emulators:start --export-on-exit=./data --import=./data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment