https://github.com/glebcha/web-push-notifications
Boilerplate for your own push notifications library
https://github.com/glebcha/web-push-notifications
boilerplate push-api pushnotifications serviceworker
Last synced: 10 months ago
JSON representation
Boilerplate for your own push notifications library
- Host: GitHub
- URL: https://github.com/glebcha/web-push-notifications
- Owner: glebcha
- License: mit
- Created: 2020-03-18T13:05:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T02:09:37.000Z (almost 3 years ago)
- Last Synced: 2025-01-03T17:19:11.397Z (12 months ago)
- Topics: boilerplate, push-api, pushnotifications, serviceworker
- Language: TypeScript
- Homepage:
- Size: 1.67 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: changelog/generate-changelog
- License: LICENSE
Awesome Lists containing this project
README
## Web Push Notifications
This library is boilerplate for your own solution.
It adds module in global namespace `window.PushInstaller`.
Firebase Cloud Messaging scripts will be loaded atomatically.
To register service worker and client on your push server you should execute `window.PushInstaller.registerSW()` anywhere. You should set service worker location if it is not in root directory. You can doi it via `window.web_push_lib_path` or local storage `{ 'web_push_lib_sw_path': path }`.
[Documentation](docs/README.md).
Библиотека добавляет глобальный модуль для работы с пуш-уведомлениями `window.PushInstaller`.
Также будут подключены необходимые библиотеки для работы с Firebase Cloud Messaging.
Для регистрации сервис-воркера и клиента на вашем пуш-сервере необходимо выполнить `window.PushInstaller.registerSW()` в любой части кодовой базы.
Если сервис-воркер находится не в рутовой директории, то необходимо записать путь расположения в `window.web_push_lib_path` или local storage `{ 'web_push_lib_sw_path': path }`.
[Документация](docs/README.md).