INNER CODE UNIT · Go

main

alexmacarthur/local-docker-db · typesense/go-sample/main.go:11

func main() {

	searchUrl, ok := os.LookupEnv("TYPESENSE_HOST")
	if !ok {
		searchUrl = "http://localhost:9108"
	}

	searchApiKey, ok := os.LookupEnv("TYPESENSE_API_KEY")
	if !ok {
		searchApiKey = ""
	}

	client := typesense.NewClient(
		typesense.WithServer(searchUrl),
		typesense.WithAPIKey(searchApiKey),
	)

	status, err := client.Health(time.Minute)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…