Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeverhart383/knock-browser-push-demo
https://github.com/jeverhart383/knock-browser-push-demo
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeverhart383/knock-browser-push-demo
- Owner: JEverhart383
- Created: 2024-04-26T12:52:09.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T18:40:23.000Z (8 months ago)
- Last Synced: 2024-11-05T20:05:07.793Z (2 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Browser push notifications in Node.js
This repo contains the example code from a blog post on the Knock blog about [sending browser push notifications in Node.js](https://knock.app/blog/how-to-send-browser-push-notifications-from-nodejs). You can find additonal details in that post.
This demo app uses Express and [Node Push Notifications](https://www.npmjs.com/package/node-pushnotifications) to send browser push notifications without an external service.
You will need to generate your own set of [VAPID key](https://vapidkeys.com/) to send push notifications.
## Getting started
You can clone this repository with the following command:
```bash
git clone https://github.com/JEverhart383/knock-browser-push-demo.git
```and then install the dependencies with `npm install`. From there, update your VAPID keys in `server.js` and `main.js` with value you created from the website above. Finally, you can start your server with `server.js` and navigate to `http://locahost:3000`.