Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/osfunapps/os-firebase-rtd-npm
a simple module to read/update/push data to Firebase Real Time Database
https://github.com/osfunapps/os-firebase-rtd-npm
firebase js node npm realtime-database
Last synced: 27 days ago
JSON representation
a simple module to read/update/push data to Firebase Real Time Database
- Host: GitHub
- URL: https://github.com/osfunapps/os-firebase-rtd-npm
- Owner: osfunapps
- Created: 2019-06-26T10:50:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-07T14:37:46.000Z (almost 4 years ago)
- Last Synced: 2024-04-24T18:54:29.971Z (8 months ago)
- Topics: firebase, js, node, npm, realtime-database
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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:
```js
var rtd = require("os-firebase-rtd")
```
Initiate the db:
```js
await rtd.initializeDB("https://your_database_url.com", "/path/to/your/service/account/json.json")
```Push:
```js
await RTDHelper.push("people", {"Moshe": "12", "Itzik": "33"})
```Read:
```js
let peopleObj = await RTDHelper.read("people")
```
Delete:
```js
await RTDHelper.delete("people")
```It is also possible to save the read properties to a file, delete after read and more.
## Links
[npm os-firebase-rtd](https://www.npmjs.com/package/os-firebase-rtd)
## Licence
ISC