Git Product home page Git Product logo

service-worker-web-push-with-fcm's Introduction

Service Worker Web Push with FCM

A demo to run Service Worker Web Push with Firebase Cloud Messaging.

Setup

  1. Clone this project
$ git clone https://github.com/embbnux/service-worker-web-push-with-fcm.git
$ yarn
  1. Create firebaseConfig.js file
$ cp demo/firebaseConfig.default.js demo/firebaseConfig.js
  1. Create a project in Firebase

  2. Get vapidKey

In Firebase project settings -> Cloud Messaging -> Web configuration: Generate a Web Push certificate. Save Key pair value as vapidKey in demo/firebaseConfig.js file

  1. Get firebaseConfig

In Firebase project settings -> General, create a Web App. Then in SDK setup and configuration, copy firebaseConfig and saved into demo/firebaseConfig.js file

  1. Start demo server
$ yarn start
  1. In Browser (Chrome/Firefox): open http://localhost:8080

  2. Click Register FCM button to get registration token.

  3. Follow here to send a test message to client

service-worker-web-push-with-fcm's People

Contributors

embbnux avatar

Watchers

 avatar  avatar

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.