Reference
@rippledb/remote-trpc
tRPC Remote implementation for client-server sync
@rippledb/remote-trpc
A Remote implementation for RippleDB sync using tRPC procedures. This is an alternative to @rippledb/remote-http.
Installation
pnpm add @rippledb/remote-trpc @trpc/clientnpm install @rippledb/remote-trpc @trpc/clientyarn add @rippledb/remote-trpc @trpc/clientUsage
createTrpcRemote takes your pull and append procedures and returns a Remote:
import { createTrpcRemote } from "@rippledb/remote-trpc";
// see https://rippledb.dev/docs/reference/server-trpc#usage for more information
import { trpc } from "./your-trpc-router-file";
const remote = createTrpcRemote({
pull: trpc.ripple.pull.query,
append: trpc.ripple.append.mutate,
});You can also pass a direct “caller” (e.g. appRouter.createCaller(...)) for
tests.