&
for parallel commands, ;
for sequential commands, To stop running commands: ctrl+Cfirebase use
firebase use prod
firebase deploy -P dev --only functions
package.json
scripts to run, debug, & deployfirebase serve
// to run hosting + functions
firebase serve --host 0.0.0.0
// to also run in mobile
firebase serve --host 0.0.0.0 --only functions
package.json
scripts to run, debug, & deploynpm run hotReload
firebase emulators:start --only functions --inspect-functions
Attach
or press F5
https://firebase.google.com/docs/functions/local-shell
firebase functions:shell
//execute trigger functions in terminal and look for logsfirebase serve
//look for terminal logsfirebase functions:log --only <method name>
//for specific function
firebase functions:log
//for all functions
firebase help functions:log
//see help
package.json
scripts to run, debug, & deployGCP
& firestore
region: asia-south1
(mumbai)functions
region: asia-east 2
(HK)to test emulators paste after functions object in firebase.json
,
"emulators": {
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"pubsub": {
"port": 8085
},
"ui": {
"enabled": true
}
}