javascript - How to close firebase connection in node.js -


below simple example how using firebase:

let firebase = require('firebase'); firebase.initializeapp({   serviceaccount: './config/firebase.json',   databaseurl: 'https://thenameofhedatabase.firebaseio.com' });  let db = firebase.database(); ... ... 

the point after code execution db object holds node.js session. not want call process.exit(0). so, right way close or dispose db object of firebase?

this has been fixed in version 3.4.1 of javascript sdk.

firebase.database().gooffline() releases database node.js process can exit.


Comments

Popular posts from this blog

javascript - Why Selenium can't find an element that is graphically visible -

c# - Get the Class name in a class with atribute inside a attribute method -

java - How to compare two classes -