Skip to content

fsojitra/Web-Push-Notification-Using-Pushjs.org-with-Nodejs-HTML-express.js-and-with-click-event-on-it

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web-Push-Notification-Using-Pushjs.org-with-Nodejs-HTML-express.js

This is example of Web Push Notification Using Pushjs.org with Nodejs,HTML,express.js. I have also put click event on notification that will change text color randomly.

If you want to use Pushjs.org in your project

clone or download from

you just need to add push.js and serviceWorker.js in your public folder and then include it in your HTML file.

Installation in local

You need to have installed Node.js, NPM in your System

To Install

npm install

Run

nodemon server.js

Code is Running on

you have to allow notification then you can click on button "Click me for notification" and you will get notification when you click on notification text below that will change color randomly as i set onClick event on Notification

You can customize your notification as you want check below link

🌟 🎉