Package Exports
- os-firebase-rtd
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (os-firebase-rtd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
os-firebase-rtd
Introduction
This project meant to provide intuitive functions to use the Firebase Real Time Database, without wasting time.
Installation
make sure you have Service Account file (a json file):
- If you don't have one, just log in to Firebase -> your project -> settings -> at the top menu Service Account -> produce a new file.
make sure to get your db address:
- log in to Firebase -> your project -> database -> the address will be on top
Quick start
Install via npm:
npm i os-firebase-rtd
Require rtd:
var rtd = require("os-firebase-rtd")
Initiate the db:
await rtd.initializeDB("https://your_database_url.com", "/path/to/your/service/account/json.json")
Push:
await RTDHelper.push("people", {"Moshe": "12", "Itzik": "33"})
Read:
let peopleObj = await RTDHelper.read("people")
Delete:
await RTDHelper.delete("people")
It is also possible to save the read properties to a file, delete after read and more.
Links
Licence
ISC