Open the dev tools to get more insights in the console.
This demo is using the web-push lib on server side and VAPID.First, we need the users permission for showing notifications.
To generate a subscription, a public key must be provided. This public key is fetched from our server, where a key pair is stored. With the corresponding private key, the push message will be later encrypted.