Integrating Node-FCM in a NodeJS server
Keeping in mind that we're in a NodeJS project, we'll see how we can fully integrate the FCM with any Nodejs application. This process is relatively easy and straightforward, and we will see how it can be done in a matter of minutes.
How to do it...
Let's ensure that our working environment is ready for our project, so let's install a couple of dependencies in order to ensure that everything will run smoothly:
- Open your terminal--in case you are using macOS/Linux--or your cmd--if you're using Windows--and write down the following command:
~> npm install fcm-push --save
By using this command, we are downloading and installing the fcm-push
library locally. If this is executed, it will help with managing the process of sending web push notification to our users.
Note
The NodeJS ecosystem has npm as part of it. So in order to have it on your working machine, you will have to download NodeJS and configure your system within. Here's the official NodeJS link...