Step 1: Configuration Firebase and Service Worker
- 1 Minute to read
- Print
- DarkLight
Step 1: Configuration Firebase and Service Worker
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Web Push at Mapp is based on Firebase.
The Service Worker is necessary to display messages when the browser or a tab are not in focus.
Download the JavaScript file firebase-messaging-sw.js.
Create the Webapp-Project in Firebase and copy the configuration.
In the JavaScript file make the following adjustments by pasting the configuration:
Example/* ... */ const firebaseConfig = { apiKey: "<<Firebase apiKey>>", authDomain: "<<Firebase authDomain>>", projectId: "<<Firebase projectId>>", storageBucket: "<<Firebase storageBucket>>", messagingSenderId: "<<Firebase messagingSenderId>>", appId: "<<Firebase appId>>", measurementId: "<<Firebase measurementId>>" }; /* ... */
Parameter
Description
apiKey
Please include as specified in your firebase console in project settings > general > my app > configuration.
authDomain
projectId
storageBucket
messagingSenderId
appId
measurementId
Watch the following video for more details:
Include the script file "firebase-messaging-sw.js" in your server.
Was this article helpful?