Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created September 12, 2022 18:24
Show Gist options
  • Save hieptl/13f6ba44d0b969a1c3f3cd5a2dd00e25 to your computer and use it in GitHub Desktop.
Save hieptl/13f6ba44d0b969a1c3f3cd5a2dd00e25 to your computer and use it in GitHub Desktop.
Chat App with Firebase - index.js - 1
var firebaseConfig = {
apiKey: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
authDomain: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
databaseURL: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
projectId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
storageBucket: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
messagingSenderId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
appId: "xxx-xxx-xxx-xxx-xxx-xxx-xxx-xxx",
};
firebase.initializeApp(firebaseConfig);
const db = firebase.database();
const username = prompt("Please Tell Us Your Name");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment