A simple Push API demo, sending encrypted payloads using the IETF webpush protocol.
View it at: https://webpush-demo.herokuapp.com/
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.
Install node.js 0.12.7 or above, then:
git clone https://github.com/johnmellor/push-api-nodejs-demo.git
npm install
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.