@potluckdb/potluckdb
v0.1.0
Published
potluckdb local-first SQLite synchronization SDK
Readme
potluckdb for Node
potluckdb is a local-first SQLite synchronization SDK. This package is
CommonJS; the runtime for the platform is installed as an optional
dependency and carries the storage library beside the runtime, and the
bucket constructors are exported from
@potluckdb/potluckdb/storage, so no further installation step exists.
Installation
npm install @potluckdb/potluckdbUsage
const potluckdb = require("@potluckdb/potluckdb");
const storage = require("@potluckdb/potluckdb/storage");
const remote = storage.fromS3({ bucket: "my-bucket", namespace: "notes", region: "eu-west-1" });
// The package is CommonJS, so `open` is awaited inside a function, as the
// quickstart's `main` does. A top-level `await` beside `require` is refused
// before the program runs.
async function main() {
const db = await potluckdb.open("app.potluckdb", remote);
}
main();The quickstart opens a database on a directory remote; the storage reference gives each constructor's full signature.
See LICENSE.
