tursobase
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

TursoBase

Sync your PocketBase data with Turso. This library enables distributed PocketBase with Turso primary database as master.

Note: PocketBase is not designed to be distributed. This test package is highly experimental.

Motivation

I intend to use PocketBase only for oauth2 and require app scalability. Turso enables replicas.

Usage

Install node package npm i tursobase

import { tursoBase } from "tursobase"

const tursoClient = createClient({
  url: "file:pb_data/data.db",
  syncUrl: process.env.TURSO_SYNC_URL,
  authToken: process.env.TURSO_AUTH_TOKEN,
})

const pbProcess = await tursoBase("pb_data", 8090, tursoClient)

Stopping process

const pbProcess = await tursoBase("pb_data", 8090, tursoClient)
pbProcess.kill()

Readme

Keywords

Package Sidebar

Install

npm i tursobase

Weekly Downloads

2

Version

0.1.10

License

MIT

Unpacked Size

11.1 kB

Total Files

19

Last publish

Collaborators

  • menglinmaker