Skip to content

Instantly share code, notes, and snippets.

View Leo3965's full-sized avatar
🏡
working from home

Leonardo Freitas Leo3965

🏡
working from home
View GitHub Profile
@Leo3965
Leo3965 / elasticsearch.ts
Created July 24, 2024 19:02
Elastic Search com Typescript
import { Client } from "@elastic/elasticsearch";
import { SearchHit } from "@elastic/elasticsearch/lib/api/types";
const endpoint = "";
const id = "";
const apiKey = "";
const client = new Client({
cloud: { id: id },
auth: { apiKey: apiKey },