createLibsqlStorage
function createLibsqlStorage(options): LibsqlLinksStorage;Defined in: src/storage/libsql.ts:60
Create a libSQL/Turso-backed LibsqlLinksStorage. The table is created
on first use (a failed DDL is retried on the next call); connection (when
constructed from url) is lazy and shared.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
LibsqlStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createLibsqlStorage } from "@xtandard/links/storage/libsql";
const storage = createLibsqlStorage({ url: process.env.TURSO_DATABASE_URL!, authToken: process.env.TURSO_AUTH_TOKEN,});// process.on("SIGTERM", () => storage.close());