Skip to content

Instantly share code, notes, and snippets.

@lachlanagnew
Last active December 20, 2017 05:09
Show Gist options
  • Select an option

  • Save lachlanagnew/8008a0cc5ccc3011719019f958b95e83 to your computer and use it in GitHub Desktop.

Select an option

Save lachlanagnew/8008a0cc5ccc3011719019f958b95e83 to your computer and use it in GitHub Desktop.
get webpush vapid keys
#In rails console
require 'webpush'
# One-time, on the server
vapid_key = Webpush.generate_key
# Save these in our application server settings
vapid_key.public_key
# => "BC1mp...HQ="
vapid_key.private_key
# => "XhGUr...Kec"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment