https://github.com/whaaaley/sse-push-notification-experiment
https://github.com/whaaaley/sse-push-notification-experiment
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/whaaaley/sse-push-notification-experiment
- Owner: whaaaley
- Created: 2021-02-11T16:34:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T16:34:46.000Z (over 5 years ago)
- Last Synced: 2025-02-08T03:16:06.491Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# push-notificaton-demo
## Generate Certificates
From node.js documentation
https://nodejs.org/api/http2.html#http2_server_side_example
```sh
openssl req -nodes -sha256 -x509 \
-newkey rsa:2048 \
-subj '/CN=localhost' \
-keyout localhost-key.pem \
-out localhost-cert.pem
```
From Let's Encrypt
https://letsencrypt.org/docs/certificates-for-localhost/
```sh
openssl req -nodes -sha256 -x509 \
-newkey rsa:2048 \
-subj '/CN=localhost' \
-keyout localhost.key \
-out localhost.crt \
-extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
```
Human readable version of the extensions config:
```sh
[dn]
CN=localhost
[req]
distinguished_name = dn
[EXT]
subjectAltName=DNS:localhost
keyUsage=digitalSignature
extendedKeyUsage=serverAuth
```