Skip to content

Instantly share code, notes, and snippets.



Created Jul 2, 2018
What would you like to do?
const icon = `app.png`;
const params = {
title: "プッシュ通知です!",
msg: `これはサーバから送っています. 今は ${new Date().toLocaleString()} です。 メッセージとアイコンも送っています `,
icon: icon
Promise.all( => {
return webpush.sendNotification(subscription, JSON.stringify(params), {});
.then(res => console.log(res))
.catch(err => console.log('ERROR', err));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment