Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

jdgamble555/adv-firestore-functions

Repository files navigation

I am not longer keeping up with this project, so feel free to fork it!

Please check my website Fireblog.io for updates.


Advanced Firestore Functions

These are the back-end firestore functions that will allow you to create easy-to-use indexes.

Installation

Install the package into your firebase functions directory.

npm i adv-firestore-functions

Import the necessary functions at the top of your firebase function file:

import { eventExists, fullTextIndex } from 'adv-firestore-functions';

All of these functions are called on an async onWrite firebase firestore function like so:

functions.firestore
    .document('posts/{docId}')
    .onWrite(async (change: any, context: any) => {
//... code
}

The search functions, however, must be put in a callable function like so:

functions.https.onCall(async (q: any) => {

// 'q' is the data coming in

//... code
}

DOCS

If you see any errors or have any suggestions, please post an issue on github.

There is more to come as I simplify my firebase functions! See Fireblog.io for more examples (whenever I finally update it)!

About

Advanced firestore functions for indexing, searching, tags, and counters!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •