Injects AlgoliaSearch into AWS Lambda context.
import algoliaMiddleware from '@airporting/middy-algolia';
middy(yourHandler)
.use(
algoliaMiddleware({
appId: 'ALGOLIA_APP_ID',
apiKey: 'ALGOLIA_ADMIN_KEY',
})
);
export default async (params, { algolia }) => {
const index = algolia.initIndex('indexName');
};