dptole / chrome-push-notification

Sample code for chrome push notifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chrome push notifications

Sample code for chrome push notifications.

Create your project here

Click here to create your project.

Get your api key and sender id

Import your recently created project to the firebase google console.

Click here 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

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

About

Sample code for chrome push notifications.


Languages

Language:JavaScript 51.3%Language:HTML 48.7%