Little Bear Web Push Provisioning Node.js Sample
This project demonstrates how to use the Google Pay Web Push Provisioning API.
- Google Cloud SDK (aka gcloud) if you wish to test on a Google App Engine instance
- A front end gateway to handle TLS termination (either Google App Engine or your own solution)
- Add the integration.min.js file
provided on the Google Pay Web Push Provisioning developer site
Running the server
- In the project directory, run
npm installto install dependencies.
- Set up your keys in the project directory as follows. Add your ASCII armored PGP keys to the top level of the project directory in files named private.key and public.key. Then, add your private key passphrase to passphrase.txt.
- Set the PIAID constant in server.js. Google will provide you with your PIAID during the PGP key exchange process.
- In the project directory, run one of the following commands:
node server.jsto run the code locally
gcloud app deployrun it on a pre-configured AppEngine instance