mix chime.gen.vapid (Chime v0.1.0-dev)

Copy Markdown View Source

Generates a pair of VAPID keys, for :web of the :push option of Chime.Config:

$ mix chime.gen.vapid

Keep the private key as a secret of the app's (an environment variable), and give both to Chime in config/runtime.exs. Make them once: browsers subscribed with the public key stop getting pushes when it changes.