text: // Give the service worker access to Firebase Messaging.
  // Note that you can only use Firebase Messaging here, other Firebase libraries
  // are not available in the service worker.
  importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
  importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');
  
  // Initialize the Firebase app in the service worker by passing in the
  // messagingSenderId.
  
  firebase.initializeApp({
    'messagingSenderId': '684850370153'
  });
  const messaging = firebase.messaging();
  messaging.setBackgroundMessageHandler(function(payload) {
    console.log('[firebase-messaging-sw.js] Received background message ', payload);
    // Customize notification here
    var notificationTitle = 'jsCHAT';
    var notificationOptions = {
      body: 'Message received!',
      icon: 'logo_small.png'
    };
  
    return self.registration.showNotification(notificationTitle,
      notificationOptions);
  });