This package provides Fedify's KvStore
and MessageQueue
implementations for PostgreSQL:
import { createFederation } from "@fedify/fedify";
import { PostgresKvStore, PostgresMessageQueue } from "@fedify/postgres";
import postgres from "postgres";
const sql = postgres("postgresql://user:password@localhost/dbname");
const federation = createFederation({
kv: new PostgresKvStore(sql),
queue: new PostgresMessageQueue(sql),
});
deno add @fedify/postgres
npm install @fedify/postgres
bun add @fedify/postgres
To be released.
Released on November 3, 2024.
-
Fixed a bug where JSON values are double-quoted in the database. Since it's a breaking change data-wise, the default values of the following options are also changed:
PostgresKvStoreOptions.tableName
defaults to"fedify_kv_v2"
.PostgresMessageQueueOptions.tableName
defaults to"fedify_message_v2"
.
Initial release. Released on September 26, 2024.