Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.19 KB

README.md

File metadata and controls

28 lines (19 loc) · 1.19 KB

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.