https://github.com/holmofy/web-push-demo
https://github.com/holmofy/web-push-demo
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/holmofy/web-push-demo
- Owner: holmofy
- License: other
- Created: 2020-11-02T13:11:47.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-25T05:07:14.000Z (almost 5 years ago)
- Last Synced: 2025-02-07T20:33:31.338Z (8 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Java WebPush Demo application
* Java WebPush demo
* https://github.com/web-push-libs/webpush-java used
* Front-end copied from https://github.com/thihara/web_push_notifications/tree/master/static
* Spring Boot is used for creating the backend## Try it out
* Checkout and run the application
* Visit http://localhost:8080 and then click on subscribe
* Post a notification by using the following command from linux/mac (or a git-bash terminal in Windows):```
curl -X POST \
http://localhost:8080/notify-all \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"title": "NaturalProgrammer",
"message": "NaturalProgmmer.com - where quality matters",
"clickTarget": "http://www.naturalprogrammer.com"
}'
```## References
* https://dzone.com/articles/web-push-notifications-1
* https://github.com/web-push-libs/webpush-java
* https://github.com/web-push-libs/webpush-java/blob/master/doc/UsageExample.md
* https://github.com/web-push-libs/webpush-java/blob/master/doc/VAPID.md