classify web
This commit is contained in:
24
public/firebase-messaging-sw.js
Normal file
24
public/firebase-messaging-sw.js
Normal file
@@ -0,0 +1,24 @@
|
||||
importScripts('https://www.gstatic.com/firebasejs/8.10.1/firebase-app.js');
|
||||
importScripts('https://www.gstatic.com/firebasejs/8.10.1/firebase-messaging.js');
|
||||
// // Initialize the Firebase app in the service worker by passing the generated config
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
authDomain: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
projectId: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
storageBucket: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
messagingSenderId: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
appId: "xxxxxxxxxxxxxxxxxxxxxxx",
|
||||
measurementId: "xxxxxxxxxxxxxxxxxxxxxxx"
|
||||
};
|
||||
|
||||
firebase?.initializeApp(firebaseConfig)
|
||||
|
||||
// Retrieve firebase messaging
|
||||
const messaging = firebase.messaging();
|
||||
|
||||
self.addEventListener('install', function (event) {
|
||||
console.log('Hello world from the Service Worker :call_me_hand:');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user