Skip to content

Brief implementation of Firebase Cloud Messaging (FCM) for both client and server, showcasing essential setup and configuration steps.

License

Notifications You must be signed in to change notification settings

eskylake/Firebase-Cloud-Messaging-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase Cloud Messaging Sample

Brief implementation of Firebase Cloud Messaging (FCM) for both client and server, showcasing essential setup and configuration steps.

Installation

1- Make sure to have the following:

2- Replace app/server/service-account.json with your own

3- Replace app/client/firebase-config.json with your own

4- Replace app/client/manifest.json[gcm_sender_id] with your FCM Sender ID

5- Run the following:

$ docker compose up -d

# Server listening on port 3000
$ docker exec -t fcm-server yarn run dev

Usage

1- Open http://localhost to ensure the client app is working properly.

2- Ensure that Notification permission is allowed and sw.js is successfully registered in the browser.

3- Send a sample notification:

# Login to the server's container & Send a notification by:
$ docker exec -t fcm-server node cli.js notif

# You can see the usage by:
$ node cli.js notif --help

License

MIT

About

Brief implementation of Firebase Cloud Messaging (FCM) for both client and server, showcasing essential setup and configuration steps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published