1.0.6 • Published 5 years ago

algolia-firestore-sync-ts v1.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

algolia-firestore-sync

Simple helper for syncing indices to Firestore on Firebase

Usage

import * as functions from 'firebase-functions';
import * as algoliasearch from 'algoliasearch';
import { syncAlgoliaWithFirestore } from 'algolia-firestore-sync-ts';

const algolia = algoliasearch(functions.config().algolia.appid, functions.config().algolia.adminkey);
const index = algolia.initIndex('ingredients');

export const syncIngredients = functions.firestore.document('/<CollectionName>/{id}').onWrite(
  (change, context) => {
    return syncAlgoliaWithFirestore(index, change, context)
  }
);

TODOs:

  • interfaces and strong typing
1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago