Popularity
6.8
Growing
Activity
3.5
Growing
12
2
11

Monthly Downloads: 7
Programming language: Haskell
License: MIT License
Tags: Web    

web-push alternatives and similar packages

Based on the "Web" category.
Alternatively, view web-push alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of web-push or a related project?

Add another 'Web' Package

README

web-push Hackage

Helper functions to send messages using Web Push protocol.

Usage

Guides to using Web Push API in browsers can be found on Mozilla's and Google's docs, or you can check out the demo app in the example folder. To run the demo app:

cd example
stack build
stack --docker-network=bridge --docker-run-args='--publish=3000:3000' exec web-push-example

Then access localhost:3000 from a browser. Keep the browser console open to check if there are errors. For use with docker, the above command requires stack 2.4 or above.

For production use, store a set of VAPID keys securely and use them for all push notification subscriptions and messages; public key will have to be exposed to client's browser when subscribing to push notifications, but private key must be kept secret and used when generating push notifications on the server. If VAPID keys are re-generated, all push notifications will require re-subscriptions. Also save the latest subscription details such as endpoint from user's browser session securely in the database and use them to send push notifications to the user later.

References

Current implementation is based on the following versions of the drafts: