JSPM

os-firebase-rtd

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28720F
  • License ISC

a simple module to read/update/push data to Firebase Real Time Database

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.

npm os-firebase-rtd

Licence

ISC