on vs code there is Live Server it is needed because service workers run on https or localhost.
./node_modules/web-push/src/cli.js generate-vapid-keys --json
- Running the application, hit the subscribe button
- When a notification appears, hit accept
- open the chrome tools console and copy the user data
- paste it at subLocal variable
pushLocal.js
pushExternal.js