i am having problems connecting to firebase reading or inserting data via NODE.js
below is my code :
var admin = require("firebase-admin");
var serviceAccount = require("./service_account.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://databaseName.firebaseio.com"
});
var db = admin.database();
var ref = db.ref("access/12345678");
ref.on("value", function(snapshot) {
console.log(snapshot.val());
}, function (errorObject) {
console.log("The read failed: " + errorObject.code);
});
admin.database.enableLogging(true);
Here is the error i am getting from the "admin.database.enablelogging(true)" bwlow
via codegod
No comments:
Post a Comment