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

ios - Is 'init' forbidden as *part* of a variable name? -

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

angular - Angular2 Router: Cannot find primary outlet to load 'HomeComponent' -