Skip to content

Instantly share code, notes, and snippets.

View leo-freiitas's full-sized avatar
🏡
working from home

Leonardo Freitas leo-freiitas

🏡
working from home
View GitHub Profile
@leo-freiitas
leo-freiitas / 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 },