1.0.7 • Published 3 years ago
firebase-algolia-sync v1.0.7
Firebase Algolia-sync
This is a module that helps you sync firebase collections with Algolia very easily.
TO BE USED IN A FIREBASE CLOUD FUNCTION INDEX.JS FILE
// CURRENT FILE: index.js of a firebase cloud function.
import * as SyncCollectionWithAlgolia from 'firebase-algolia-sync';
// OR
const SyncCollectionWithAlgolia = require('firebase-algolia-sync');
const options = {
ALGOLIA_ID: 'YOUR_ALGOLIA_ID',
ALGOLIA_ADMIN_KEY: 'YOUR_ALGOLIA_ADMIN_KEY',
}
module.exports = {
...SyncCollectionWithAlgolia('myCollectionName', options)
};
the SyncCollectionWithAlgolia fucntion returns function which hook into onCreate, onUpdate and onDelete operations on a collection via the firebase could funciton API.