Skip to content

Commit 11f40ef

Browse files
author
Matt Gaunt
committed
Adding content to readme
1 parent 9663a8c commit 11f40ef

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ registration.pushManager.subscribe({
8989
});
9090
```
9191

92+
## Command Line
93+
94+
You can install `web-push` globally and use it for send notifications and / or
95+
generating VAPID keys.
96+
97+
Install like so:
98+
99+
npm install web-push -g
100+
101+
Then you can run the following commands:
102+
103+
Usage:
104+
105+
web-push send-notification --endpoint=<url> [--key=<browser key>] [--auth=<auth secret>] [--payload=<message>] [--ttl=<seconds>] [--vapid-subject=<vapid subject>] [--vapid-pubkey=<public key url base64>] [--vapid-pvtkey=<private key url base64>] [--gcm-api-key=<api key>]
106+
107+
web-push generate-vapid-keys [--json]
108+
109+
92110
# API Reference
93111

94112
## sendNotification(pushSubscription, payload, options)

0 commit comments

Comments
 (0)