Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/airporting/middy-algolia

Injects Algolia into context
https://github.com/airporting/middy-algolia

algolia middy

Last synced: about 2 months ago
JSON representation

Injects Algolia into context

Awesome Lists containing this project

README

        

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Static Badge](https://img.shields.io/badge/coverage-100-brightgreen)
![Static Badge](https://img.shields.io/badge/release-1.0.2-blue)
[![test](https://github.com/airporting/ebics-parser/actions/workflows/test.yml/badge.svg)](https://github.com/airporting/ebics-parser/actions/workflows/test.yml)

# middy-algolia

Injects AlgoliaSearch into AWS Lambda context.

```javascript
import algoliaMiddleware from '@airporting/middy-algolia';

middy(yourHandler)
.use(
algoliaMiddleware({
appId: 'ALGOLIA_APP_ID',
apiKey: 'ALGOLIA_ADMIN_KEY',
})
);
```

## Usage

```javascript
export default async (params, { algolia }) => {
const index = algolia.initIndex('indexName');
};
```