UNPKG

nestjs-meili

Version:

Seamless and declarative integration of [MeiliSearch](https://www.meilisearch.com/) into [NestJS](https://nestjs.com/). Use decorators to configure indexes and inject `MeiliSearch` with type safety and zero boilerplate.

4 lines (3 loc) 218 B
import { Inject } from "@nestjs/common"; export const getMeiliIndexToken = (indexName) => `MEILI_INDEX_${indexName.toUpperCase()}`; export const InjectMeiliIndex = (indexName) => Inject(getMeiliIndexToken(indexName));