Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cypressxyx/firestore-nodejs-example


https://github.com/cypressxyx/firestore-nodejs-example

Last synced: 23 days ago
JSON representation

Awesome Lists containing this project

README

        

Connecting to firestore using nodejs example


This git provides example on how to use the firestore SDK using node.js

Initial Setup


Install the firestore SDK locally using

npm i @google-cloud/firestore

Make sure to have a keyfile.json ready to access the db.
File can be found by going to

project settings > service accounts > Firebase ADMIN SDK > Generate new Private key

ConnecToDb.js


Contains an example of how to setup a connection to your firestore DB

addDocumentToCollection.js


Contains an example of how to add a document to a collection in your firestore DB

getDataFromCollection.js


Contains an exampleof how to get data from a certain collection