I\'m building a command-line application in node.js and would like to receive GCM push notifications (the command-line app will be interacting with the same set of services
It's not mandatory to depend only on GCM, today there are many packages are available for sending pushNotification.
Two node packages are listed below.
fcm-call is used - you can find documentation from https://www.npmjs.com/package/fcm-node/
let FCM = require('fcm-call');
const serverKey = '';
const referenceKey = ''; //Device Key
let title = '';
let message = '';
FCM.FCM(serverKey, referenceKey, title, message);
And Your notification will be sent within 2-3 seconds.
Happy Notification.