В этом видео мы создадим возможность push-уведомлений с помощью Node.js без каких-либо сторонних сервисов. Мы добьемся этого, используя web-push, push/notifications API и сервис-воркеров. Код:

Веб-репо:

Полезные статьи:


💖 Станьте покровителем: окажите поддержку и получите бонусы!

Веб-сайт и курсы Udemy

Подписывайтесь на Traversy Media:




source
According to researches by the adsmember team

Rate us
0 0 votes
Article Rating
Subscribe
Notify of
guest
22 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
techdave99
techdave99
5 months ago

Edge 17 (in the april windows 10 update) has service workers. In Edge 16, workers are installed by enabling the 'Enable Services Workers' flag.

Nicky TheCasper
Nicky TheCasper
5 months ago

very nice and simple frame for web push worker. Thanks a lot – I'm going to repeat on my project)

Pygems Software
Pygems Software
5 months ago

Another gem from traversy. On an abstruse subject made simple

Deepak Soni
Deepak Soni
5 months ago

Do this work with mobile apps even when the app is not running?

Abscon Ditus
Abscon Ditus
5 months ago

How does this make any sense? Who would send a push notification from the client to the same client? You should have shown a different server or different client sending the push and the other receiving…

Sergio Ballestero
Sergio Ballestero
5 months ago

Nice tutorial, will be great if you can explain me how can i make this with user segmentation. For example i want to send a message to all the user that have to send required documents

Jorge Zingg Jorge
Jorge Zingg Jorge
5 months ago

This is really simple and cool, thanks a lot! One question thjough: I tried to modify the code to get notifications every 5 seconds by putting the webpush inside a setInterval… But the browser gets only one notification only. Would that even be possible?

Untakble
Untakble
5 months ago

thank you very much I've been looking for this for a very long time

Srikanth Racharla
Srikanth Racharla
5 months ago

DOMException: Registration failed – no Service Worker, Getting this Error, while creating subscription object, anyone help me please

Tristan Phillips
Tristan Phillips
5 months ago

Thanks! This is just what I was looking for. Nicely explained.

Dimitar Getsov
Dimitar Getsov
5 months ago

Great, as usual…..Sir Brad Traversy…

Jegan S
Jegan S
5 months ago

You really did it..🥰,

Kindly update how can i send dynamic data in push notifications, in other server react js build🥺 please me

Fabio Colella
Fabio Colella
5 months ago

So, if my backend consumes some APIs, then I need to poll them from time to time and send a notification to the client, based on the response, right? This makes me think I cannot have anything like that on a service like heroku which starts your backend when somebody visits it. Is it so? 😊

Jason Grace
Jason Grace
5 months ago

Nothing happened!

Aishwarya B N
Aishwarya B N
5 months ago

Hey worked fine in asking permission but in notifying part this is giving me an error that "I must pass in a subscription with at least an endpoint" how to fix it

slyrockyballboa
slyrockyballboa
5 months ago

Great video! Thanks
Push notification recived only if you refresh browser, how to achive without browser refresh?

Swatilekha Roy
Swatilekha Roy
5 months ago

Thanks a lot!!!

Behzad Abf
Behzad Abf
5 months ago

please please webrtc thankssss

Ashwin Chaudhary
Ashwin Chaudhary
5 months ago

Sir I am Getting Error: Reference Error:navigator is not defined.

Akshit Dandyan
Akshit Dandyan
5 months ago

Thanks Traversy Media, I will be using it in my MERN app

ariss bandoss
ariss bandoss
5 months ago

Nice tutorial. But does it require the user to have the web page active to see this?? Can we do it when the user is not even in the browser?? Thanks

Nova i love you
Nova i love you
5 months ago

THANK YOU!!!!

22
0
Would love your thoughts, please comment.x
()
x