I am new on firebase and want to show notification over browser through firebase cloud messaging but problem is that i am confuse where to write this code ::
POST /fcm/send HTTP/1.1
Host: fcm.googleapis.com
Content-Type: application/json
Authorization: key=YOUR_SERVER_KEY
{
"notification": {
"title": "New chat message!",
"body": "There is a new message in FriendlyChat",
"icon": "/images/profile_placeholder.png",
"click_action": "http://localhost:5000"
},
"to":"YOUR_DEVICE_TOKEN"
}
please tell me in which file I'll have to write this code.
Any help will be appreciated.