DEV Community

Discussion on: PWA Push Notifications with Firebase (Cloud Messaging)-Part 1

Collapse
 
devpato profile image
Pato

Can you send me a link to your repo?

Collapse
 
joakflores profile image
Joak

Maybe I found the error, please give me if I'm right ....

1) This code has to be on service worker, right?
var firebaseConfig = {
apiKey: "xxxxx",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxxx",
messagingSenderId: "xxxxx",
appId: "xxxxx",
measurementId: ""
};
firebase.initializeApp(firebaseConfig);

2) Firebase seek a specific service worker name in the app? , I have one with the name sw.js, that name works?

Regards