The HTTPS Callable functions Web Quickstart demonstrates how to send requests to a server-side function and get a response back using the Firebase JS SDK. It interoperates with the iOS and Android database quickstarts.
Read more about Cloud Functions for Firebase
- Create your project in the Firebase Console.
- Enable the Google sign-in provider in the Authentication > SIGN-IN METHOD tab.
- You must have the Firebase CLI installed. If you don't have it, install it with
npm install -g firebase-tools
and then configure it withfirebase login
. - Clone this repository and open the functions directory:
git clone https://github.com/firebase/quickstart-js; cd functions
- Install cloud functions dependencies:
npm --prefix functions install
- On the command line run
firebase use --add
and select the Firebase project you have created. - On the command line run
firebase deploy
to deploy the application. - On the command line run
firebase open hosting:site
to open the deployed web app. - Sign in the Application using the Button.
- Write two numbers in the boxes and Click the "Add the Two Numbers" button.
- You should be getting the result of the addition.
- Write a message in the Box below and Click the "Add Message" button.
- The message is added below but if it contains bad words or SHOUTING!! it will be sanitized.
© Google, 2018. Licensed under an Apache-2 license.