Firebase is available as both node module and browser side script.
Every data has a url
Write(save) data
Update data
update() only updates data at the first child level, any data passed in beyond the first child level is a treated as a set() operation.
Write and Update using callbacks
Push data
At a multi user platform where simultaneously several users are engaging with the same data, the use of set() might be hazardous. Instead firebase provides push() that generates a unique ID every time a new child is added to the specified database reference.
Transaction
These are useful for “atomic operations”
Offline
A firebase client also maintains its own local version of it, so everytime it is written to this local version first and then client then synchronizes the local version with the database. Once connectivity is reestablished, firebase database will receive the appropriate set of events so that the client “catches up” with the current server state.
Read data
And similarly, child_changed and child_removed.
once()
Security Check!
Below example allows anyone to read/write /users/mohan and its children, but doesn’t allow for admin.