Created
October 26, 2021 17:43
-
-
Save abeisgoat/1078848ba7988ee413585be8849c14c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="description" content="Starter Snowpack App" /> | |
<title>Starter Snowpack App</title> | |
<script type="module" src="/index.js"></script> | |
</head> | |
<body> | |
<h1>Welcome to Snowpack!</h1> | |
</body> | |
</html> |
This file contains hidden or 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
import { initializeApp } from "firebase/app"; | |
import {getAnalytics} from "firebase/analytics"; | |
import {getRemoteConfig, getValue, fetchAndActivate} from "firebase/remote-config"; | |
const firebaseConfig = { | |
apiKey: "AIzaSyCdLN1gpqB78g-foh3gAKbUmb8tOl-76To", | |
authDomain: "abe-today.firebaseapp.com", | |
databaseURL: "https://abe-today.firebaseio.com", | |
projectId: "abe-today", | |
storageBucket: "abe-today.appspot.com", | |
messagingSenderId: "780082191189", | |
appId: "1:780082191189:web:16b6c8cba766ff111b2ddc", | |
measurementId: "G-JQJ1PKW9KT" | |
}; | |
window.FIREBASE_REMOTE_CONFIG_URL_BASE = "http://localhost:9091" | |
// Initialize Firebase | |
const app = initializeApp(firebaseConfig); | |
const rc = getRemoteConfig(app); | |
// const analytics = getAnalytics(app); | |
rc.settings.minimumFetchIntervalMillis = 0; | |
rc.defaultConfig = { | |
"likely_to_convert": false | |
}; | |
(async () => { | |
await fetchAndActivate(rc); | |
const val = getValue(rc, "likely_to_convert"); | |
console.table({val}); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment