Everything is working great except when I try to write to my database. The web page reads and deletes successfully.
Both read and write rules are set to true. this is how I set up firebase:
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyA5fulcW9C8xxmo5UeeS3khTrYCW4yMpKI",
authDomain: "some-app.firebaseapp.com",
databaseURL: "https://some-app.firebaseio.com",
projectId: "some-app",
storageBucket: "some-app.appspot.com",
messagingSenderId: "870590230527"
};
firebase.initializeApp(config);
</script>
And here is the app.js file. There are 3 attempts at writing data to the database which all failed. Nothing was added and no errors were returned. The reading and deleting works fine which means that I have firebase set up correctly. The set() attempt is straight from the Firebase docs. I only want to add a new entry in "articles" with a generated ID, which has a title, author, and text property. That's it.
var database = firebase.database();
firebase.database().ref('articles/' + randKey.toString()).set({
title: title_,
author: author_,
text: text_
});