https://github.com/dptole/chrome-push-notification
Sample code for chrome push notifications.
https://github.com/dptole/chrome-push-notification
chrome fcm-notifications gcm nodejs notification push
Last synced: 7 months ago
JSON representation
Sample code for chrome push notifications.
- Host: GitHub
- URL: https://github.com/dptole/chrome-push-notification
- Owner: dptole
- Created: 2017-06-26T21:07:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-25T21:12:46.000Z (over 1 year ago)
- Last Synced: 2025-01-10T08:30:42.400Z (9 months ago)
- Topics: chrome, fcm-notifications, gcm, nodejs, notification, push
- Language: JavaScript
- Size: 49.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Chrome push notifications
=========================Sample code for chrome push notifications.
Create your project here
========================Click [here][gc-project] to create your project.
Get your api key and sender id
==============================Import your recently created project to the firebase google console.
Click [here][fc-project] to open the console where you should be able to get your api key.
> Replace the URL so it looks like this https://console.firebase.google.com/project/NAME_OF_YOUR_PROJECT/settings/cloudmessaging/?hl=en
The `api_key` is named `Server key` (which is the longer one) and the `sender_id` is named `Sender ID`, easy peasy lemon squeezy.
Get the google news api key
===========================Just create your account and grab the generated API key.
[News API documentation][gnews-documentation]
Create your `env.json`
======================Copy the file `env.example.json` renaming it to `env.json`. Replace the fields `gcm_sender_id`, `google_news_api_key` and `api_key` with the information found on the previous steps.
Demo
====Click the image below.
[![Demo][ngrok-image]][ngrok-far]
[ngrok-far]: https://dptole.ngrok.io/chrome_push_notification/
[ngrok-image]: https://ngrok.com/static/img/demo.png
[gc-project]: https://console.cloud.google.com/projectcreate?previousPage=%2Fprojectselector%2Fiam-admin%2Fsettings&organizationId=0
[fc-project]: https://console.firebase.google.com/project/
[gnews-documentation]: https://newsapi.org/#documentation
[gnews-login]: https://newsapi.org/login