В этом видео мы создадим возможность 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
18 days 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
18 days 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
18 days ago

Another gem from traversy. On an abstruse subject made simple

Deepak Soni
Deepak Soni
18 days ago

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

Abscon Ditus
Abscon Ditus
18 days 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
18 days 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
18 days 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
18 days ago

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

Srikanth Racharla
Srikanth Racharla
18 days ago

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

Tristan Phillips
Tristan Phillips
18 days ago

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

Dimitar Getsov
Dimitar Getsov
18 days ago

Great, as usual…..Sir Brad Traversy…

Jegan S
Jegan S
18 days 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
18 days 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
18 days ago

Nothing happened!

Aishwarya B N
Aishwarya B N
18 days 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
18 days ago

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

Swatilekha Roy
Swatilekha Roy
18 days ago

Thanks a lot!!!

Behzad Abf
Behzad Abf
18 days ago

please please webrtc thankssss

Ashwin Chaudhary
Ashwin Chaudhary
18 days ago

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

Akshit Dandyan
Akshit Dandyan
18 days ago

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

ariss bandoss
ariss bandoss
18 days 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
18 days ago

THANK YOU!!!!

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