The following is a simple example of how I use firebase:
let firebase = require('firebase');
firebase.initializeApp({
serviceAccount: './config/firebase.json',
databaseURL: 'https://thenameofhedatabase.firebaseio.com'
});
let db = firebase.database();
...
...
The fact is that after executing the code, the object dbcontains a node.js session. I do not want to call process.exit(0). So what is the correct way to close or delete an object dbfor firebase?
source
share