Created
January 28, 2018 22:52
-
-
Save jasminabasurita/1073787135031ddc96805c298adc56dd to your computer and use it in GitHub Desktop.
webPushBoilerplate for Push Tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const router = require("express").Router() | |
module.exports = router | |
const webpush = require("web-push") | |
webpush.setGCMAPIKey(process.env.GOOGLE_API_KEY) | |
webpush.setVapidDetails( | |
"mailto:[email protected]", | |
process.env.PUBLIC_VAPID_KEY, | |
process.env.PRIVATE_VAPID_KEY | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment