// Command vapidgen prints a fresh VAPID key pair for Web Push, formatted as the // two env vars cdrop reads. Generate once and store the keys as deployment // secrets — rotating them invalidates every existing browser subscription. // // just vapid-keygen # or: go run ./cmd/vapidgen package main import ( "fmt" "os" webpush "github.com/SherClockHolmes/webpush-go" ) func main() { priv, pub, err := webpush.GenerateVAPIDKeys() if err != nil { fmt.Fprintln(os.Stderr, "vapidgen: generate keys:", err) os.Exit(1) } fmt.Println("CDROP_VAPID_PUBLIC_KEY=" + pub) fmt.Println("CDROP_VAPID_PRIVATE_KEY=" + priv) }