1.0.6 • Published 7 years ago

algolia-firestore-sync-ts v1.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
7 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

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago