Skip to content

AdamMachera/testnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpush demo

A simple Push API demo, sending encrypted payloads using the IETF webpush protocol.

View it at: https://webpush-demo.herokuapp.com/

Browser support

Chrome has implemented support for the corresponding client-side API, though it currently requires a few patches and command line flags. Other browsers will be listed here once they support webpush.

Setup

Install node.js 0.12.7 or above, then:

git clone https://github.com/johnmellor/push-api-nodejs-demo.git
npm install

Run

GCM_SENDER_ID and GCM_API_KEY environment variables must be passed to the server, for example:

export GCM_SENDER_ID=653317226796
export GCM_API_KEY=AIzaSyBBh4ddPa96rQQNxqiq_qQj7sq1JdsNQUQ
npm start

The API key above is only for debugging, and must not be used in production. Instead you can obtain your own Sender ID and API key from the Google Developer Console.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published