Send a Push Notification to everyone who is in the User Range – JS Cloud Function

myproject/functions/index.js

Code :

How To Upload:
The Firebase CLI requires Node.js and npm, which you can install by following the instructions on https://nodejs.org/. Installing Node.js also installs npm.
Once you have Node.js and npm installed, install the Firebase CLI via npm:

To initialize your project:

Run

to log in via the browser and authenticate the firebase tool.
Go to your Firebase project directory.
Run

. The tool gives you an option to install dependencies with npm. It is safe to decline if you want to manage dependencies in another way.

Get Started Tutorial from Firebase: Write and Deploy Your First Functions

Leave a Reply

Your email address will not be published.