{"id":22968244,"url":"https://github.com/mustafahere/node-firebase-push-notification","last_synced_at":"2025-07-17T14:06:46.726Z","repository":{"id":167337852,"uuid":"642944155","full_name":"mustafahere/node-firebase-push-notification","owner":"mustafahere","description":"An npm package that simplifies sending push notifications using Firebase Cloud Messaging (FCM) in Node.js applications.","archived":false,"fork":false,"pushed_at":"2024-01-21T10:47:13.000Z","size":64,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T02:49:40.558Z","etag":null,"topics":["fcm","firebase","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mustafahere.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-19T17:53:37.000Z","updated_at":"2025-02-19T12:08:37.000Z","dependencies_parsed_at":"2023-08-18T13:31:27.106Z","dependency_job_id":null,"html_url":"https://github.com/mustafahere/node-firebase-push-notification","commit_stats":null,"previous_names":["mustafahere/node-firebase-push-notification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mustafahere/node-firebase-push-notification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustafahere%2Fnode-firebase-push-notification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustafahere%2Fnode-firebase-push-notification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustafahere%2Fnode-firebase-push-notification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustafahere%2Fnode-firebase-push-notification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mustafahere","download_url":"https://codeload.github.com/mustafahere/node-firebase-push-notification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mustafahere%2Fnode-firebase-push-notification/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265614311,"owners_count":23798426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fcm","firebase","nodejs","typescript"],"created_at":"2024-12-14T21:16:47.795Z","updated_at":"2025-07-17T14:06:46.705Z","avatar_url":"https://github.com/mustafahere.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Firebase Push Notification\n\n[![npm version](https://img.shields.io/npm/v/node-firebase-push-notification.svg)](https://www.npmjs.com/package/node-firebase-push-notification)\n[![License](https://img.shields.io/github/license/mustafahere/node-firebase-push-notification.svg)](https://github.com/mustafahere/node-firebase-push-notification/blob/main/LICENSE)\n\nNode Firebase Push Notification is an npm package that simplifies sending push notifications using Firebase Cloud Messaging (FCM) in Node.js applications.\n\n## Installation\n\nTo install the package, use npm:\n\n```bash\nnpm install node-firebase-push-notification\n```\n\n## Usage\n\n```js\nconst { FirebaseAdmin } = require('node-firebase-push-notification');\n\n// Initialize FirebaseAdmin with your credentials\nFirebaseAdmin.initialize({\nprojectId: 'your-project-id',\nprivateKey: 'your-private-key',\nclientEmail: 'your-client-email',\ndatabaseURL: 'your-database-url'\n});\n\n// Get the FirebaseAdmin instance\nconst firebaseAdmin = FirebaseAdmin.getInstance();\n\n// Send push notifications to a list of device tokens\nfirebaseAdmin.sendMulticastMessaging(\n['deviceToken1', 'deviceToken2'],\n'Notification Title',\n'Notification Body',\n{ customData: 'value' },\n)\n.then((batchResponse) =\u003e {\nconsole.log('Push notification sent:', batchResponse);\n})\n.catch((error) =\u003e {\nconsole.error('Error sending push notification:', error);\n});\n```\n\nPlease remember to replace the placeholders such as `'your-project-id'`, `'your-private-key'`, `'your-client-email'`, `'your-database-url'` with the appropriate values for your project.\n\n## Contributing\n\nContributions are welcome! Please follow the contribution guidelines before submitting a pull request.\n\n## License\n\nThis package is MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustafahere%2Fnode-firebase-push-notification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmustafahere%2Fnode-firebase-push-notification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustafahere%2Fnode-firebase-push-notification/lists"}