This sample app shows how to run Google's push notifications.
Google manual https://developers.google.com/google-apps/calendar/v3/push Registered domain https://secure-mountain-3276.herokuapp.com
- Be careful. Google api method /v3/*/watch works only with server side auth
- You must check SSL domain validation. For example https://www.sslshopper.com/ssl-checker.html You need have all green marks as ssl checker result, before you continue.
- Complete the site verification process using https://www.google.com/webmasters/tools You need upload file to your server. Follow google manual please.
- Go to the Google Developers Console. In the sidebar on the left APIs & auth > Push, Click Add domains and add domain "secure-mountain-3276.herokuapp.com"
- Go to the Google Developers Console. In the sidebar on the left APIs & auth > Credentials, Click Create new "Cliend Id" and generate key in p12 format for "Service account"
- We require a node.js module that has only one dependency, the googleapis module.
- Auto authenticate to google
- Callback that allow to know if calendar updated
This folder contains secrets information from google developer console
First, you should have gotten a .p12 file and a secret to decrypt the file when you created the service account in Google API console. Run the following command to decrypt the p12 file.
$ openssl pkcs12 -in googleapi-privatekey.p12 -out googleapi-privatekey.pem -nocerts -nodes
Make sure you have Node.js and the Heroku Toolbelt installed.
$ npm install
$ npm start
Your app should now be running on localhost:5000.
$ git push heroku master
For more information about using Node.js on Heroku, see these Dev Center articles: