web-push-libs / web-push

Web Push library for Node.js
Other
3.26k stars 305 forks source link

How to define target endpoint for notification #860

Closed MarcusHSmith closed 11 months ago

MarcusHSmith commented 11 months ago

Problem

Please explain what behaviour you are seeing.

How do I define the endpoint when a user clicks the notification? I'm struggling to find documentation about how the payload or options should be structured in webpush.sendNotification

Thanks

marco-c commented 11 months ago

I suggest looking at the example on MDN or the Service Worker Cookbook: https://github.com/web-push-libs/web-push#help.