From the course: JavaScript: Progressive Web Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Installing Mozilla's Web Push library - JavaScript Tutorial
From the course: JavaScript: Progressive Web Applications
Installing Mozilla's Web Push library
- [Instructor] Since this is a plain Vanilla JavaScript course, I'm going to use Mozilla's web push library for Node. It is well-maintained, updated frequently, and easy to use. It also has the benefit of using JavaScript as the programming language. Information on the web push library is available on GitHub. In order to use the library, you'll need to install Node. Node is a JavaScript runtime built on Google's V8 JavaScript engine. Essentially Node allows you to run JavaScript in a terminal window instead of a browser. This upgrades JavaScript to be a full-fledged programming language, no longer dependent on the browser. Node includes NPM, the Node Package Manager, which allows you to install Node modules, called packages, from the command line in a terminal window. The web push library is installed via NPM. So, in order to install it, you first install Node. Get the latest long-term support version of Node for your operating system at nodejs.org. So I'll click on the LTS version…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to notifications2m 21s
-
(Locked)
Requesting permission to show notifications5m 26s
-
(Locked)
Displaying a notification4m 50s
-
(Locked)
Adding data to a notification4m 36s
-
(Locked)
Closing a notification3m 33s
-
(Locked)
Handling the notification click event11m 25s
-
(Locked)
Push messaging overview1m 24s
-
(Locked)
Adding Firebase Cloud Messaging to the project2m 15s
-
(Locked)
Subscribing to push messaging6m
-
(Locked)
Handling push notifications3m 14s
-
(Locked)
Sending a tickle using cURL4m 57s
-
(Locked)
Sending data in a push message2m 9s
-
(Locked)
Installing Mozilla's Web Push library2m 51s
-
(Locked)
Modifying the push event handler2m 52s
-
(Locked)
Modifying the notification click event3m 48s
-
(Locked)
Creating the web push script6m
-
(Locked)
Testing the hosted app5m 7s
-
(Locked)
-
-