18 lines
412 B
TypeScript
18 lines
412 B
TypeScript
import dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
import { MeiliSearch } from 'meilisearch';
|
|
|
|
|
|
const meiliSearchKey = process.env.MEILISEARCH_KEY;
|
|
const host = process.env.MEILISEARCH_URL!;
|
|
export const meiliSearch = new MeiliSearch({
|
|
host: host,
|
|
apiKey: meiliSearchKey,
|
|
});
|
|
|
|
export const index = meiliSearch.index('test-embedding');
|
|
|
|
// const one = await index.getDocuments({ limit: 1 });
|
|
// console.log(one);
|