Integrations

Add-ons

Connection pooler (PgBouncer), cache (Valkey/Redis) and search (Meilisearch).

This page is available in Polish only for now. The commands, code and API calls below are the same in every language — an English translation is on its way. Open the Polish page

Add-ony to dodatkowe usługi HostBase uruchamiane w sieci Twojego projektu. Włączysz je w Integracje lub Ustawienia → Add-ony (owner lub admin). Dane dostępowe i gotowe snippety znajdziesz na stronie dodatku oraz w oknie Połącz.

Add-onPołączeniePlan
Connection pooler (PgBouncer, tryb transakcyjny)db-<ref>.host.ulewicz.space:6543, TLS wymaganyWszystkie
Cache (Valkey, zgodny z Redis)rediss://default:<hasło>@cache-<ref>.host.ulewicz.space:6380Pro+
Wyszukiwarka (Meilisearch)https://search-<ref>.host.ulewicz.space + klucz masterPro+

Pooler z Prisma

DATABASE_URL="postgresql://postgres:[HASŁO]@db-<ref>.host.ulewicz.space:6543/postgres?sslmode=require&pgbouncer=true"
DIRECT_URL="postgresql://postgres:[HASŁO]@db-<ref>.host.ulewicz.space:5432/postgres?sslmode=require"

W trybie transakcyjnym nie używaj poleceń sesyjnych (SET, LISTEN, advisory locks między transakcjami). Migracje uruchamiaj przez połączenie bezpośrednie.

Cache

import Redis from "ioredis";
const redis = new Redis(process.env.REDIS_URL); // rediss://default:…@cache-<ref>.host.ulewicz.space:6380
await redis.set("sesja:42", JSON.stringify(dane), "EX", 3600);

Cache ma limit pamięci i politykę allkeys-lru — najstarsze klucze są usuwane automatycznie. Dane nie są trwałe.

Wyszukiwarka

import { MeiliSearch } from "meilisearch";
const search = new MeiliSearch({ host: "https://search-<ref>.host.ulewicz.space", apiKey: process.env.MEILI_KEY });
await search.index("produkty").addDocuments(produkty);
const { hits } = await search.index("produkty").search("rowr"); // literówki są tolerowane