JSFiddle - React, Tailwind, and code Playground

by Brent Coder

HTML

<script src="https://www.gstatic.com/firebasejs/3.6.10/firebase.js"></script>

JavaScript

var config = {
    apiKey: "AIzaSyB0vpoKM0ZHAbLDb4O6Mx2pe1X9QaOS9So",
    authDomain: "henrys-garage.firebaseapp.com",
    databaseURL: "https://henrys-garage.firebaseio.com",
    storageBucket: "henrys-garage.appspot.com",
    messagingSenderId: "563303792758"
  };
  
firebase.initializeApp(config);

var database = firebase.database();

var newtestguy = database.ref('newtestguy');

var data = {
  name: 'hello',
  testingapply: 'good'
}

newtestguy.push(data, finished);

function finished(error) {
  if (error) {
    console.log('ooops');
  } else {
    console.log('data saved!');
  }
}