This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GW V1.7 | |
// Low power store and forward firmware for GW_v1.x hardware | |
//#define SHOW_WDT_MSGS | |
//#define AOUT | |
#define Serial SerialUSB | |
#define DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
importScripts('https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js'); | |
importScripts('https://www.gstatic.com/firebasejs/7.18.0/firebase-messaging.js'); | |
const config = { | |
apiKey: process.env.REACT_APP_FIREBASE_KEY, | |
authDomain: process.env.REACT_APP_FIREBASE_DOMAIN, | |
databaseURL: process.env.REACT_APP_FIREBASE_DATABASE, | |
projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, | |
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, | |
messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ('serviceWorker' in navigator && process.env.NODE_ENV !== 'production') { | |
console.log('Trying to register custom sw'); | |
navigator.serviceWorker | |
.register('./firebase-messaging-sw.js') | |
.then(function (registration) { | |
console.log('Registration successful, scope is:', registration.scope); | |
}) | |
.catch(function (err) { | |
console.log('Service worker registration failed, error:', err); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A simple page created for the assignment for freeCodeCamp course. | |
------ | |
A [Pen](https://codepen.io/m3h0w/pen/BRbEPb) by [Michał](http://codepen.io/m3h0w) on [CodePen](http://codepen.io/). | |
[License](https://codepen.io/m3h0w/pen/BRbEPb/license). |