Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/index.js

Created Jul 2, 2018
Embed
What would you like to do?
const webpush = require("web-push");
const keys = require("./application-server-keys.json");
webpush.setVapidDetails(
"mailto:admin@moongift.jp",
keys.publicKey,
keys.privateKey
);
const subscribers = [
{
"endpoint":"https://fcm.googleapis.com/fcm/send/e7K...Hag",
"expirationTime":null,
"keys":{
"p256dh":"BK7...e5U",
"auth":"DGt...D8g"
}
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment