Giter VIP home page Giter VIP logo

web-push-notifications's Introduction

Prerequisites

Install nvm

This project requires the LTS version of Node. If you have another version installed, you can best manage them using Node Version Manager (nvm)

Read Installing and Updating section to add nvm to your machine

Installing LTS Node version

Once you have nvm installed, you can installed the LTS version using the following command

nvm install --lts

The output may look like the following

nvm install --lts
Installing latest LTS version.
Downloading and installing node v12.16.1...
Downloading https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.xz...
############################################################################################################ 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v12.16.1 (npm v6.13.4)

Note: If your terminal is not using the LTS version of node, use the following command

nvm use stable

You should see an output similar to the following

โžœ  nvm use stable
Now using node v12.16.2 (npm v6.14.4)

Getting the project locally

git clone [email protected]:hhimanshu/web-push-notifications.git

cd web-push-notifications

Installing dependencies

The dependency for entire project can be downloaded using the following command

npm install

Start the Client App

Once installed, you can start the client app with the following command

npm start

This will start the client app at localhost:9999.

Start the Server App

node server/app.js

References

Use Notification Generator demo to test the client notification subscription workflow

Customize the Notification options object

API documentation of Clients interface

API documentation for clients.openWindow

API documentation on clients.matchAll

API documentation for PushManager.subscribe

API documentation of Service Worker getNotifications

API documentation of Service Worker showNotifications

API documentation of ServiceWorkerRegistration

API Reference for webPush.sendNotification

Usage Example for FakerJS helpers.createTransaction

W3 Spec on Service Worker event.waitUntil

W3 Spec on Page Visibility

web-push-notifications's People

Contributors

hhimanshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

web-push-notifications's Issues

Regarding Push service API

Hi @hhimanshu

Should I use any third party push service API like firebase for my official app or should I create this as my own separately. I am not clear on this and little confuse.

Could you help to share your thoughts with me?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.