Skip to content

Commit b0a986c

Browse files
johanbookJohan Book
and
Johan Book
authored
chore(api): add script to generate vapid keys (#901)
Co-authored-by: Johan Book <{ID}+{username}@users.noreply.github.com>
1 parent f32dd7e commit b0a986c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# Exit immediately if a command exits with a non-zero status
4+
set -e
5+
6+
npx ts-node ./dist/cli/generate-vapid-keys.cli.js
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { generateVAPIDKeys } from "web-push";
2+
3+
const keys = generateVAPIDKeys();
4+
console.log(`VAPID_PRVIVATE_KEY=${keys.privateKey}`);
5+
console.log(`VAPID_PUBLIC_KEY=${keys.publicKey}`);

0 commit comments

Comments
 (0)