This quickstart demonstrates using Firebase SDK for Cloud Functions with Firebase Realtime Database.
This sample app does two things:
- Create messages in the Firebase Realtime Database using a simple HTTPS request which is handled by a v2 HTTPS function. Writing to the Realtime Database is done using the Firebase Admin SDK.
- When a message gets added in the Realtime Database, a v2 function triggers and automatically makes these messages all uppercase.
To deploy and try out the sample:
- Create a Firebase project using the Firebase console
- Install the required dependencies by running
npm install
in thefunctions
directory - Deploy your project's code using
firebase deploy
- Create a message by opening the querying the functions URL from your browser.
The function executes and redirects the browser to the Firebase console at the database location where the text string was stored. You should see your text value displayed in the console and in uppercase.
We'd love you to contribute to the project. Before doing so please read our Contributor guide.
© Google, 2022. Licensed under an Apache-2 license.