Skip to content

Commit b2683f8

Browse files
committed
readme updated including online testing
1 parent 6d4d6d3 commit b2683f8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Boilerplate with React ⚛️ and Firebase 🔥designed to quickly spin up a ful
4242
- [Selecting an alias](#selecting-an-alias)
4343
- [Creating a new cloud function](#creating-a-new-cloud-function)
4444
- [Testing functions locally](#testing-functions-locally)
45+
- [Testing functions in online mode](#testing-functions-online)
4546
- [Deployment](#deployment)
4647
- [Continuous integration/deployment](#continuous-integrationdeployment)
4748
- [Workflows folder structure](#workflows-folder-structure)
@@ -408,6 +409,18 @@ After it initializes, you should get your endpoints to test your HTTP functions:
408409
409410
More information about the [Firebase Emulator](https://firebase.google.com/docs/rules/emulator-setup).
410411
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+
411424
### Deployment
412425
413426
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:
634647
<li><a href="https://github.com/jbheber">Juan Heber</a></li>
635648
<li><a href="https://github.com/vikdiesel">Viktor Kuzhelny</a></li>
636649
<li><a href="https://github.com/TOPOFGR">Franco Galeano</a></li>
650+
<li><a href="https://github.com/jfocco">Juan Focco</a></li>
637651
</ul>
638652
639653
## License

functions/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
},
1717
"main": "lib/index.js",
1818
"dependencies": {
19-
"chai-as-promised": "^7.1.1",
2019
"firebase-admin": "^8.12.1",
2120
"firebase-functions": "^3.6.2",
2221
"firebase-functions-test": "^0.2.1",

0 commit comments

Comments
 (0)