android-gcm-server-node
Visit the following url and register your app. Download the google-services.json file and note the API Key.
https://developers.google.com/mobile/add?platform=android&cntapi=gcm
Modify constants.json file in constants directory. Paste your GCM server key for the JSON object gcm_api_key.
Download dependencies
Open terminal and use the command.
npm install
Executing the project
Open terminal and use the command.
node app
Complete tutorial
https://www.learn2crack.com/2016/05/gcm-push-notification-server-node-js-mongodb.html