hydrabadger-android/nodejs_hydra
KORuL eff1d25871 Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
..
.idea Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
functions Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
.firebaserc Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
.gitignore Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
LICENSE Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
README.md Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
firebase.json Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
package-lock.json Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00
y Automatic connectify with push FCM Firebase 2019-02-19 13:57:16 -08:00

README.md

Firebase SDK for Cloud Functions Quickstart - HTTPS trigger

This function using the Firebase SDK for Cloud Functions with an HTTPS to send push to cuurent user.

Introduction

The function send to idTo id push with text text

Further reading:

Initial setup, build tools and dependencies

1. Clone this repo

Clone or download this repo and open directory.

2. Create a Firebase project and configure the quickstart

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.

3. Install the Firebase CLI and enable Functions on your Firebase CLI

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.

Deploy the app to prod

First you need to install the npm dependencies of the functions:

cd functions && npm install; cd ..

This installs locally:

  • The Firebase SDK and the Firebase Functions SDK.
  • The moment npm package to format time.
  • The cors npm package to allow Cross Origin AJAX requests on the endpoint.

Deploy to Firebase using the following command:

firebase deploy

This deploys and activates the date Function.

The first time you call firebase deploy on a new project with Functions will take longer than usual.

Try the sample

After deploying the function you can open the following URLs in your browser with json params:

https://us-central1-<project-id>.cloudfunctions.net/sendPush

License


License: LGPL v3.0

This project is licensed under the GNU Lesser General Public License v3.0. See the LICENSE file for details.