Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Initialize Cloud Firestore through Firebase
- var db = firebase.firestore();
- // Disable deprecated features
- db.settings({
- timestampsInSnapshots: true
- });
- //collector that sends some data toe the firestore
- db.collection("users").add({
- first: "Ada",
- last: "Lovelace",
- born: 1815
- })
- .then(function(docRef) {
- console.log("Document written with ID: ", docRef.id);
- })
- .catch(function(error) {
- console.error("Error adding document: ", error);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement