The function lbListener
is created to receive HTTP POST messages from LB API.
The URL of this function, eg:
https://us-central1-AAAA-BBBBB.cloudfunctions.net/lbListener
Should be used in the register_push example as the endpoint value
Further reading:
Clone or download this repo and navigate into the directory
You need to have installed the Firebase CLI. If you haven't run:
npm install -g firebase-tools
Doesn't work? You may need to change npm permissions.
Login to firebase (if not already done) using
firebase login
Create a Firebase Project on the Firebase Console.
Set up your Firebase project by running firebase use --add
, select your Project ID and follow the instructions.
First you need to install the npm
dependencies of the functions:
cd functions && npm install; cd ..
This installs dependencies locally
Deploy to Firebase using the following command:
firebase deploy
This deploys and activates the lbListener Function.
The first time you call
firebase deploy
on a new project with Functions will take longer than usual.
The example will create collections under /incoming - view data there
© Lightbug Ltd, 2020. Licensed under an Apache-2 license.