1.0.1 • Published 2 years ago

loopback4-connector-firebase-admin v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

loopback4-connector-firebase-admin

Firebase Admin connector for the LoopBack framework.

System Requirements

Installation

If you want to know how to get started with Loopback check this.

To add a new data source, use the data source generator:

lb4 datasource

Then the data source generator will prompt some questions like

  • Enter the data-source name: Firebase
  • Select the connector for Firebase: other
  • Enter the connector's module name loopback4-connector-firebase-admin
  • Install loopback4-connector-firebase-admin (Y/n) y

Then you should use a service account. Go to Project Settings > Service Accounts in the Google Cloud Platform Console. Generate a new private key and save the JSON file.

You should fill the application's datasource file which is located in /server/datasources.json with those details, You can find them in the downloaded JSON file from the Google Cloud Platform.

"Firebase": {
  "name": "Firebase",
  "projectId": "",
  "clientEmail":  "",
  "privateKey": "",
  "databaseURL": ""
}

Connection properties

PropertyType  Description---
projectIdStringproject_id in the JSON file---
clientEmailStringclient_email in the JSON file---
privateKeyStringprivate_key in the JSON file---
databaseURLStringrealtime database url---

And you can actually store those private details as an Environment variables, Check source-configuration