Giter Site home page Giter Site logo

diegoazh / loopback-connector-firestore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dyaa/loopback-connector-firestore

0.0 1.0 0.0 939 KB

Firebase Firestore connector for the LoopBack framework.

License: MIT License

JavaScript 25.02% TypeScript 74.98%

loopback-connector-firestore's Introduction

loopback-connector-firestore

Firebase Firestore connector for the LoopBack framework.

wercker status npm npm npm

I needed an easy way to connect a Loopback application to Firebase's NoSQL database Firestore so that i decided to build this connector.

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:

lb datasource

Then the data source generator will prompt some questions like

  • Enter the data-source name: Firestore (Choose your prefered name)
  • Select the connector for Firestore: other
  • Enter the connector's module name loopback-connector-firestore
  • Install loopback-connector-firestore (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.

"firestore": {
  "name": "firestore",
  "projectId": "",
  "clientEmail":  "",
  "privateKey": "",
  "databaseName": "Optional, Default: projectId"
}

Connection properties

Property Type   Description ---
projectId String project_id in the JSON file ---
clientEmail String client_email in the JSON file ---
privateKey String private_key in the JSON file ---
databaseName String Firebase's project id Optional, Default: projectId

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

Inspiration

I've got inspired by the Official MongoDB connector by Loopback

License

Copylefted (c) 2017 Dyaa Eldin Moustafa Licensed under the MIT license.

loopback-connector-firestore's People

Contributors

arkgast avatar cbullokles avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dyaa avatar henriquecarv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.