You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -408,6 +409,18 @@ After it initializes, you should get your endpoints to test your HTTP functions:
408
409
409
410
More information about the [Firebase Emulator](https://firebase.google.com/docs/rules/emulator-setup).
410
411
412
+
### Testing functions in online mode
413
+
414
+
Testing your cloud functions online is very simple and easy.
415
+
416
+
For that, you only have to set the variables localted in the env.example.json inside /functions folder. (Remember to rename the file to env.json)
417
+
418
+
After that, navigate to the /functions folder and execute **npm test** in your terminal.
419
+
420
+
Note: For finding your service account key you should go to your proyect in the Firebase dashboard, click on **_Project settings_** and then click on **_Service accounts_** tab. After that you'll be able to click on **_Generate new private key_** button and a json file containing your service account's credentials will be downloaded. Place that file in your project and include the location of it into the **_"serviceAccountKey"_** in your env.json file.
421
+
422
+
_Warning: Use extra caution when handling service account credentials in your code. Do not commit them to a public repository, deploy them in a client app, or expose them in any way that could compromise the security of your Firebase project._
423
+
411
424
### Deployment
412
425
413
426
When a pull request gets merged into development, functions are deployed automatically to the staging project in Firebase. Likewise, when merging/pushing into master, they're deployed to production.
@@ -634,6 +647,7 @@ We'd like to thank these awesome people who made this whole thing happen:
0 commit comments