Skip to content

Instantly share code, notes, and snippets.

@smd877
Created July 4, 2019 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smd877/0a0336f75927237d0ef42c5d1f8f8886 to your computer and use it in GitHub Desktop.
Save smd877/0a0336f75927237d0ef42c5d1f8f8886 to your computer and use it in GitHub Desktop.
--- ../html.bak/firebase-messaging-sw.js 2019-07-04 03:46:11.000000000 +0900
+++ firebase-messaging-sw.js 2019-07-04 11:41:01.940048485 +0900
@@ -1,9 +1,19 @@
// Import and configure the Firebase SDK
// These scripts are made available when the app is served or deployed on Firebase Hosting
// If you do not serve/host your project using Firebase Hosting see https://firebase.google.com/docs/web/setup
-importScripts('/__/firebase/5.5.6/firebase-app.js');
-importScripts('/__/firebase/5.5.6/firebase-messaging.js');
-importScripts('/__/firebase/init.js');
+importScripts('https://www.gstatic.com/firebasejs/6.2.4/firebase-app.js');
+importScripts('https://www.gstatic.com/firebasejs/6.2.4/firebase-messaging.js');
+ var firebaseConfig = {
+ apiKey: "AIzaSyCNp7t2Cug1TIjk-8WKF-QX9QVaU2m-UGM",
+ authDomain: "smd-pj01.firebaseapp.com",
+ databaseURL: "https://smd-pj01.firebaseio.com",
+ projectId: "smd-pj01",
+ storageBucket: "",
+ messagingSenderId: "596738022287",
+ appId: "1:596738022287:web:ddc64d7e8e3c8548"
+ };
+ firebase.initializeApp(firebaseConfig);
+
var messaging = firebase.messaging();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment