Skip to content

Instantly share code, notes, and snippets.

@pflevy
Last active June 9, 2019 21:52
Show Gist options
  • Save pflevy/8beab9f3723b12441c8d887d61bb2bca to your computer and use it in GitHub Desktop.
Save pflevy/8beab9f3723b12441c8d887d61bb2bca to your computer and use it in GitHub Desktop.
// Import the firebase package downloaded to this project folder through npm
import firebase from "firebase";
// Define a variable of the project name, which is used in the config parameters for firebase
const firebaseProjectName = "<YOUR_FIREBASE_PROJECT_NAME>"
// Parameters required by the initializeApp used below
const config = {
apiKey: "<YOUR_WEB_API_KEY>",
authDomain: `${firebaseProjectName}.firebaseapp.com`,
databaseURL: `https://${firebaseProjectName}.firebaseio.com`,
projectId: `${firebaseProjectName}`
};
firebase.initializeApp(config);
export default firebase;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment