Skip to content

minghan9456/web-push-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Notification from backend Practice

Pre Work

# Install web-push -g
$ npm install web-push -g
# Generate vapid keys
$ web-push generate-vapid-keys [--json]
# Save your vapid keys (Public & Private)

Build Setup

# Paste public key to ./static/html/test.html
# Paste public key & private key to ./push.js 

# Launch express server
$ node ./index.js
# Go to localhost:3000 and allow notification permission

# Open new terminal window & excute push.js to push notification from backend.
$ node ./push.js

# Finally, will get notification on your browser.

About

Web Notification from backend Practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors