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

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -