@forest-fire/real-time-admin
Helpful abstraction on the Firebase admin API
Last updated 2 months ago by ksnyde .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @forest-fire/real-time-admin 
SYNC missed versions from official npm registry.

Build Status Coverage Status MIT license

A minimal abstraction over the Firebase ADMIN API

Basic Usage

Meant for backend nodejs micro-services which interact with Firebase's Admin API using a "service policy" to authenticate.

import DB from 'abstracted-admin';
const db = new DB();
// Get a list of records
const users = await db.getValue<IUser[]>('users');
// Push a new value onto a list
const company: ICompany = {
  name: "Acme",
  employees: 500
}
db.push<ICompany>('/companies', company);

Authentication

All of the Authentication is done transparently as soon as requests are made to the database. In order for this library to achieve this it will need the following environment variables set:

  • FIREBASE_SERVICE_ACCOUNT - this should be a URI-Encoded string of the JSON data which you exported at the time you created a Service Account on Google.
  • FIREBASE_DATA_ROOT_URL - comes from the Firebase console and dictates which DB to connect to

Mocking

This library supports simple redirecting of all operations to the firemock mocking library; see related projects) and the "Mocking" section of the docs here for more details. In cases where mocking is being used, authentication (and security rights for paths) are not supported and therefore the above ENV variables are not required.

Documentation

Gitbook

Current Tags

  • 0.59.2                                ...           latest (2 months ago)

120 Versions

  • 0.59.2                                ...           2 months ago
  • 0.59.0                                ...           2 months ago
  • 0.58.4                                ...           2 months ago
  • 0.58.3                                ...           2 months ago
  • 0.58.2                                ...           2 months ago
  • 0.58.1                                ...           2 months ago
  • 0.58.0                                ...           2 months ago
  • 0.57.1                                ...           2 months ago
  • 0.57.0                                ...           2 months ago
  • 0.56.5                                ...           2 months ago
  • 0.56.4                                ...           2 months ago
  • 0.56.3                                ...           2 months ago
  • 0.56.2                                ...           2 months ago
  • 0.56.1                                ...           2 months ago
  • 0.56.0                                ...           2 months ago
  • 0.55.13                                ...           3 months ago
  • 0.55.11                                ...           3 months ago
  • 0.55.10                                ...           3 months ago
  • 0.55.8                                ...           3 months ago
  • 0.55.7                                ...           3 months ago
  • 0.55.4                                ...           4 months ago
  • 0.55.3                                ...           4 months ago
  • 0.55.2                                ...           4 months ago
  • 0.55.0                                ...           4 months ago
  • 0.54.3                                ...           4 months ago
  • 0.54.2                                ...           4 months ago
  • 0.54.1                                ...           4 months ago
  • 0.54.0                                ...           4 months ago
  • 0.53.31                                ...           4 months ago
  • 0.53.30                                ...           4 months ago
  • 0.53.29                                ...           4 months ago
  • 0.53.28                                ...           4 months ago
  • 0.53.27                                ...           4 months ago
  • 0.53.26                                ...           4 months ago
  • 0.53.25                                ...           4 months ago
  • 0.53.24                                ...           4 months ago
  • 0.53.23                                ...           4 months ago
  • 0.53.21                                ...           4 months ago
  • 0.53.20                                ...           4 months ago
  • 0.53.19                                ...           4 months ago
  • 0.53.18                                ...           4 months ago
  • 0.53.17                                ...           4 months ago
  • 0.53.16                                ...           4 months ago
  • 0.53.15                                ...           4 months ago
  • 0.53.14                                ...           4 months ago
  • 0.53.11                                ...           4 months ago
  • 0.53.9                                ...           4 months ago
  • 0.53.8                                ...           4 months ago
  • 0.53.6                                ...           4 months ago
  • 0.53.5                                ...           4 months ago
  • 0.53.4                                ...           4 months ago
  • 0.53.3                                ...           4 months ago
  • 0.53.1                                ...           4 months ago
  • 0.53.0                                ...           4 months ago
  • 0.52.8                                ...           4 months ago
  • 0.52.7                                ...           4 months ago
  • 0.52.6                                ...           4 months ago
  • 0.52.5                                ...           4 months ago
  • 0.52.4                                ...           4 months ago
  • 0.52.3                                ...           4 months ago
  • 0.52.1                                ...           4 months ago
  • 0.52.0                                ...           4 months ago
  • 0.51.0                                ...           4 months ago
  • 0.50.8                                ...           4 months ago
  • 0.50.7                                ...           5 months ago
  • 0.50.6                                ...           5 months ago
  • 0.50.5                                ...           5 months ago
  • 0.50.3                                ...           5 months ago
  • 0.50.1                                ...           5 months ago
  • 0.50.0                                ...           5 months ago
  • 0.49.10                                ...           5 months ago
  • 0.49.9                                ...           5 months ago
  • 0.49.8                                ...           5 months ago
  • 0.49.6                                ...           5 months ago
  • 0.49.5                                ...           5 months ago
  • 0.49.4                                ...           5 months ago
  • 0.49.3                                ...           5 months ago
  • 0.49.2                                ...           5 months ago
  • 0.49.0                                ...           5 months ago
  • 0.48.20                                ...           5 months ago
  • 0.48.18                                ...           5 months ago
  • 0.48.17                                ...           5 months ago
  • 0.48.15                                ...           5 months ago
  • 0.48.14                                ...           5 months ago
  • 0.48.13                                ...           5 months ago
  • 0.48.12                                ...           5 months ago
  • 0.48.11                                ...           5 months ago
  • 0.48.10                                ...           5 months ago
  • 0.48.9                                ...           5 months ago
  • 0.48.8                                ...           5 months ago
  • 0.48.7                                ...           5 months ago
  • 0.48.6                                ...           5 months ago
  • 0.48.5                                ...           5 months ago
  • 0.48.4                                ...           5 months ago
  • 0.48.3                                ...           5 months ago
  • 0.48.2                                ...           5 months ago
  • 0.48.1                                ...           5 months ago
  • 0.48.0                                ...           5 months ago
  • 0.47.1                                ...           5 months ago
  • 0.47.0                                ...           5 months ago
  • 0.46.0                                ...           5 months ago
  • 0.45.1                                ...           5 months ago
  • 0.45.0                                ...           5 months ago
  • 0.44.13                                ...           5 months ago
  • 0.44.11                                ...           5 months ago
  • 0.44.10                                ...           5 months ago
  • 0.44.9                                ...           5 months ago
  • 0.44.8                                ...           5 months ago
  • 0.44.7                                ...           5 months ago
  • 0.44.6                                ...           5 months ago
  • 0.44.5                                ...           5 months ago
  • 0.44.3                                ...           5 months ago
  • 0.44.2                                ...           5 months ago
  • 0.44.1                                ...           5 months ago
  • 0.44.0                                ...           5 months ago
  • 0.43.0                                ...           6 months ago
  • 0.42.0                                ...           6 months ago
  • 0.41.0                                ...           6 months ago
  • 0.40.1                                ...           6 months ago
  • 0.40.0                                ...           6 months ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dev Dependencies (27)

Copyright 2014 - 2016 © taobao.org |